On Fri, May 04, 2012 at 11:34:02PM +0200, Erik Lax wrote:
> Hi,
> 
> I noticed that tcpbench sometimes crashes when using -n and -b combined,
> this is because of a double-free in the client initialization loop.

This is consistently reproducible for me, if I run "tcpbench -s" in one
session and tcpbench with the following -n and -b flags in another:

$ tcpbench -v -n 50 -b 127.0.0.1 127.0.0.1
  elapsed_ms          bytes         mbps   bwidth 
Trying [127.0.0.1]:12345
Try to bind to [127.0.0.1]:0
Try to bind to [127.0.0.1]:0
Try to bind to [127.0.0.1]:0
Try to bind to [127.0.0.1]:0
Try to bind to [127.0.0.1]:0
Try to bind to [127.0.0.1]:0
Try to bind to [127.0.0.1]:0
Try to bind to [127.0.0.1]:0
Try to bind to [127.0.0.1]:0
tcpbench in free(): error: chunk is already free 0x209819300
Abort trap (core dumped) 

Erik's diff fixes it for me, and the code looks good to me too. :)

Lawrence

Reply via email to