[Android] New Bug Hunting on Android …

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Android] New Bug Hunting on Android …

jouvieje
This post was updated on .
Not sure if it's the right place to post, but to follow Bug Hunting on Android … posted by Sven, there will be potentially more nio bugs in Android ICS (4.0.1).

After long debugging, I've found that ShortBuffer.put(short) and put(int,short) for ShortBuffer created with ByteBuffer.asShortBuffer is not properly implemented. This is also the case for similar method in FloatBuffer, IntBuffer, ...
Giving a quick look in android ics source of 14 Nov, this bug seem confirmed. The ShortBuffer implementation is ShortToByteBufferAdapter, put(short) and put(int,short) does not properly keep in sync the limit to the internal byteBuffer, while put(short[]) does.
Expect strange behavior if you're using put(short) after using modifying limit and with put(short[]) operations.

Here's a test case showing the bug.

Not sure if this bug will be in official ICS, but some devices will possibly have it. I'm using a google nexus s phone with cyanogen mod cm9 rom.
Does anyone have an official ICS device to comfirm this bug ?

Edit: If someone know where bug should be filled to google, please let me know :)
Jérôme
Reply | Threaded
Open this post in threaded view
|

Re: [Android] New Bug Hunting on Android …

Sven Gothel
Administrator
On Sunday, December 11, 2011 08:43:00 PM jouvieje [via jogamp] wrote:

>
> Not sure if it's the right place to post, but to follow
> http://jausoft.com/blog/2011/10/04/bug-hunting-on-android/ Bug Hunting on
> Android …  posted by Sven, there will be potentially more major nio bugs in
> Android ICS (4.0.1).
>
> After long debugging, I've found that ShortBuffer.put(short) and
> put(int,short) for ShortBuffer created with ByteBuffer.asShortBuffer is not
> properly implemented. This is also the case for similar method in
> FloatBuffer, IntBuffer, ...
> Giving a quick look in
> http://wolfpaulus.com/journal/android-journal/androidicssource android ics
> source of 14 Nov , this bug seem confirmed. The ShortBuffer implementation
> is ShortToByteBufferAdapter, put(short) and put(int,short) does not properly
> keep in sync the limit to the internal byteBuffer, while put(short[]) does.
> Expect strange behavior if you're using put(short) after using modifying
> limit and with put(short[]) operations.
>
> Here's a  http://jerome.jouvie.free.fr/NioBugActivity.java test case
> showing the bug.
>
> Not sure if this bug will be in official ICS, but some devices will possibly
> have it. I'm using a google nexus s phone with cyanogen mod cm9 rom.
> Does anyone have an official ICS device to comfirm this bug ?
>

Thank you very much for the heads up Jérôme.

We will consider your findings w/ when resuming the Android work
next week (or so ..).

~Sven

>
> -----
> Jérôme