LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   unwanted glibc crash messages (http://www.linuxquestions.org/questions/slackware-14/unwanted-glibc-crash-messages-848912/)

Keith Hedger 12-07-2010 02:06 PM

unwanted glibc crash messages
 
I am writing a script using man2html and some man pages cause man2html to crash ie
Code:

gunzip --to-stdout /usr/man/man7/groff_hdtbl.7.gz |man2html -r
will cause a glibc crashdump like so
Code:

*** glibc detected *** man2html: free(): invalid next size (fast): 0x0000000000613610 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x78812)[0x7f0dc8832812]
/lib64/libc.so.6(cfree+0x73)[0x7f0dc8836623]
man2html[0x405ac8]
man2html[0x407300]
man2html[0x406fa2]
man2html[0x407300]
man2html[0x406fa2]
man2html[0x407300]
man2html[0x4086f4]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7f0dc87d8c7d]
man2html[0x400f99]
======= Memory map: ========
00400000-0

the crash ISN'T the problem its all the bumpf it prints out I need to find a way to suppress this output because it mucks up the dialog box I'm using, tried redirecting stderr, using setterm -msg off, googling, apropos etc but no luck any ideas?

Richard Cranium 12-07-2010 03:24 PM

See /etc/profile.d/glibc.sh and then http://www.gnu.org/s/libc/manual/htm...-Checking.html

Keith Hedger 12-08-2010 01:04 PM

Thanks!
Adding this:
Code:

export MALLOC_CHECK_=4
to the script cures the problem nice one:)

Richard Cranium 12-08-2010 11:35 PM

(scratches chin)

Well, you may consider the messages to be bumf, but man2html could be corrupting memory. Now, if you never run man2html as root, then it may not be a big deal (since you won't be corrupting any system services). If you stay logged in for long periods of time as the user running man2html, you may see some really odd behavior in some of your programs (like your window manager if you are running under X). I hope that you reported the issue to the man2html maintainers.

Keith Hedger 12-09-2010 12:39 PM

I am aware of the danger of memory overflow problems especially when run as root hence i left the MALLOC_CHECK in /etc/profile.d/glibc.sh alone and only set it in the script which only gets run once in a while and never as root and my machine is shut down most nights so this is not a problem ( but thanks for the head up anyway ), didn't think to report the bug but I will now as it is easily reproducible.


All times are GMT -5. The time now is 10:28 PM.