Bug 189587 - MALLOC_CHECK= doesn't like being empty
MALLOC_CHECK= doesn't like being empty
Product: Fedora
Classification: Fedora
Component: glibc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2006-04-21 09:07 EDT by Nigel Horne
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-04-24 05:02:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nigel Horne 2006-04-21 09:07:53 EDT
Description of problem:
Set malloc check to an empty string, and watch programs crash

Version-Release number of selected component (if applicable):

How reproducible:
Every time

Steps to Reproduce:
1. export MALLOC_CHECK_=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:
Comment 1 Jakub Jelinek 2006-04-24 05:02:46 EDT
Oh, it hurts!  Don't do it then, MALLOC_CHECK_= is not documented to have any
Anyway, I posted two alternative patches for upstream inclusion, certainly this
is not something that needs to be backported though.
Comment 2 Nigel Horne 2006-04-24 05:09:24 EDT
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.
Comment 3 Jakub Jelinek 2006-04-24 05:18:21 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.