Description of problem: Set malloc check to an empty string, and watch programs crash Version-Release number of selected component (if applicable): glibc-2.3.6-3 How reproducible: Every time Steps to Reproduce: 1. export MALLOC_CHECK_=3 2. MALLOC_CHECK_= who 3. Actual results: [njh@njh Greater_London]$ MALLOC_CHECK_= who malloc: using debugging hooks Segmentation fault Expected results: [njh@njh Greater_London]$ MALLOC_CHECK_=3 who malloc: using debugging hooks njh pts/0 Apr 21 13:53 (bandsman.co.uk) [njh@njh Greater_London]$ Additional info:
Oh, it hurts! Don't do it then, MALLOC_CHECK_= is not documented to have any meaning. Anyway, I posted two alternative patches for upstream inclusion, certainly this is not something that needs to be backported though. http://sources.redhat.com/ml/libc-hacker/2006-04/msg00010.html
MALLOC_CHECK_ is documented in "man malloc". Responding with "well don't do it then" when someone reports a bug doesn't inspire people to report more bugs.
MALLOC_CHECK_ with empty string certainly is not documented, neither in man malloc nor in info libc. Passing clearly invalid values to functions/env vars/etc. is a user bug, unless it has security consequences. As MALLOC_CHECK_ is completely disregarded in suid/sgid and other programs with escalated priviledges, this doesn't have security consequences.