billybiset / ana-net

Automatically exported from code.google.com/p/ana-net
0 stars 0 forks source link

Malloc assert violation with glibc-2.13 #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile ana-net with app examples
2. Run any server app that use ana-net in this case: 'chat'

What is the expected output? What do you see instead?
The chat server must started with the following message: "Server running, Enter 
to quit."

But instead appear this error:
server: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) 
&((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) 
&& old_size == 0) || ((unsigned long) (old_size) >= (unsigned 
long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * 
(sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 
0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
Aborted

What version of the product are you using? On what operating system?
Ubuntu 11.04
glibc-2.13
g++ 4.5.2

Please provide any additional information below.
backtrace of gdb and valgrind output are attached. See these files.

Original issue reported on code.google.com by emab73 on 13 Jul 2011 at 7:51

Attachments:

GoogleCodeExporter commented 9 years ago
This valgrind record:

==4056== 32 bytes in 1 blocks are definitely lost in loss record 2 of 2
==4056==    at 0x402641D: operator new(unsigned int) (vg_replace_malloc.c:255)
==4056==    by 0x41A98DD: asio_server::run(std::string) (asio_server.cpp:113)
==4056==    by 0x8053A35: ChatServer::run(std::string) (server.cpp:59)
==4056==    by 0x805215D: main (server.cpp:165)

Was fixed in this commit: http://code.google.com/p/ana-net/source/detail?r=10

Original comment by billybiset on 19 Aug 2011 at 1:01

GoogleCodeExporter commented 9 years ago
Please attach the new valgrind report.

Original comment by danielgutson@gmail.com on 26 Aug 2011 at 1:50