Bug 54 - Buffer data corruption errors
Buffer data corruption errors
Product: ns-3
Classification: Unclassified
Component: core
PC Linux
: P1 blocker
Assigned To: ns-bugs
Depends on:
  Show dependency treegraph
Reported: 2007-07-17 09:51 EDT by Gustavo J. A. M. Carneiro
Modified: 2007-07-19 07:49 EDT (History)
0 users

See Also:

Adds a utils/buffer-stress-testing program (3.41 KB, text/x-patch)
2007-07-17 09:52 EDT, Gustavo J. A. M. Carneiro

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo J. A. M. Carneiro 2007-07-17 09:51:43 EDT
I have made a "buffer stress testing" program which demonstrates that there exists at least one bug inside Buffer occasionally causing data corruption when headers are added and removed.  This bug is affecting my OLSR codel, but I am not sure I am able to fix it in useful time :-(
Comment 1 Gustavo J. A. M. Carneiro 2007-07-17 09:52:37 EDT
Created attachment 31 [details]
Adds a utils/buffer-stress-testing program
Comment 2 Gustavo J. A. M. Carneiro 2007-07-17 10:09:18 EDT
A sample of what error is given:

Testing with a packet of size 83339
Chunk size 4411
Chunk size 77656
Chunk size 838
Chunk size 144
Chunk size 231
Chunk size 51
Chunk size 7
Chunk size 1
Comparing resulting buffer with original...
assert failed. file=../utils/buffer-stress-testing.cc, line=69, cond="memcmp (outputBuffer.PeekData (), inputBuffer.PeekData (), actualSize) == 0"
Segmentation fault (core dumped)

This means memory comparison fails, which means data corruption happened somewhere.
Comment 3 Gustavo J. A. M. Carneiro 2007-07-19 07:49:33 EDT
Fixed in ns-3-dev