這樣試試

回答: 沒怎麽看懂ohlalala2008-07-30 05:14:17

$export MALLOC_CHECK_=3
then run your program. If the crash happens, the error messages will be printed on stderr and the program will be aborted. If ulimit is set properly, a core file will also be created. In most cases, crash in glibc is caused by heap corruption. From the core file, maybe you can find more clues.

glibc and gcc are pretty good in compatability. I am not sure if this could be caused by different glibc. I tend to believe it's the code itself. Later versions of glibc are more strict to heap corruptions than older versions. But, if you want to try old gcc, glibc, just download them from gnu webside or install from yast/yast2 (I doubt OpenSuse's repository keeps them though). You don't have to install 8.2. Plus, 8.2 image was not free, you either had to buy it (Suse professional) or install from ftp.

Good luck.

所有跟帖: 

請您先登陸,再發跟帖!