开发者

C++ server crashes with abort() in _UTF8_init() on free()

开发者 https://www.devze.com 2023-04-12 20:42 出处:网络
I\'m having problems with C++ code loaded via dlopen() by a C++ CGI server. After a while, the program crashes unexpectedly, but consistently at memory management function call (such as free(), calloc

I'm having problems with C++ code loaded via dlopen() by a C++ CGI server. After a while, the program crashes unexpectedly, but consistently at memory management function call (such as free(), calloc(), etc.) and produces core dump similar to this:

#0  0x0000000806b252dc in kill () from /lib/libc.so.6
#1  0x0000000804a1861e in ra开发者_如何学编程ise () from /lib/libpthread.so.2
#2  0x0000000806b2416d in abort () from /lib/libc.so.6
#3  0x0000000806abdb45 in _UTF8_init () from /lib/libc.so.6
#4  0x0000000806abdfcc in _UTF8_init () from /lib/libc.so.6
#5  0x0000000806abeb1d in _UTF8_init () from /lib/libc.so.6
... the rest of the stack

Has anyone seen something like this before?

What is _UTF8_init() and why would memory management functions call it?


That smells like a corrupted heap, likely due to a buffer overrun somewhere in your code. Try running your program with Valgrind and look for any errors or warnings it emits.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号