How did you reproduce this bug?

I tried writing a small test program based on ringbuffer.c, and then did
the following:

1. created a new ringbuffer of size 8192
2. called ring_buffer_write_advance(buf, 8192)

This causes buf->in to get set to 8192.

3. called ring_buffer_drain(buf, 8188)

This causes buf->out to get set to 8188.

4. I then called ring_buffer_avail_no_wrap() and 8188 was returned.

I threw this together pretty quick, so maybe I made a mistake somewhere?
I'll attach the test program to the bug.

I checked, and there are no unit tests for ringbuffer.   I think it
might be a good idea to add some unit tests for it.



** Changed in: ofono (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1408228

Title:
  GRilIO may stop reading under boundary conditions

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ofono/+bug/1408228/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to