This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Realloc returns NULL
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: "Jeff Baumes" <jeff dot baumes at kitware dot com>
- Cc: libc-help at sourceware dot org
- Date: Thu, 18 Dec 2008 18:53:49 -0500
- Subject: Re: Realloc returns NULL
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=0YlHKRC3xlEpFveeNU0xj+h9xhdZ5xQRtfc6/JMlGd4=; b=dwLvkKlyBqe+MFIVj9WDx2xbMTLMcE7F0R8smylLsbGF/M4/36rkAmqkxWqo46hn3U FAQwhDnrsavbXl7xet/ANu0N5M4HaaqdoIB276ZeWvO4PbxLneifIL6DkrQvhYVloOu9 O65g55llRnYVcBP+C1foO3vBIOsS2O01n0uUg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=rH2EeymgdlJRYU8NyWFAQEAEz8X/vtPEzq8ns1w1FmMJ6x/VoRTb7gM9geN4OEnR/q 9wnb+hf2c+NOEDJW3pS4oFgA1htvJasA3NMf/ncYrT+XLDZGrTpCYGXlBvd89/sIH4c1 9M6chhL9S4VEbVPS+8VZcQoWn9n7gvrg47zBw=
- References: <2137e33e0812181411u7ce0e296rdf71d5af87fa191@mail.gmail.com> <119aab440812181418j5a8b3fd1qf3c8805898d3f367@mail.gmail.com> <2137e33e0812181535t4599a5dcg4b4f11fd32f738f9@mail.gmail.com>
On Thu, Dec 18, 2008 at 6:35 PM, Jeff Baumes <jeff.baumes@kitware.com> wrote:
> When I set MALLOC_CHECK_=3 in my environment to abort when a problem
> is detected, I cannot get the program to crash. It apparently is using
> a different version of realloc?
No. The same version of realloc is used. At check action 3
malloc_printerr will print error messages to stderr when it detects an
error.
> Any other ideas for tracking this down?
Is your kernel mremap function broken?
The glibc realloc will preferentially use the kernel to remap and
expand the mmap'd chunk using mremap.
Try a different, older or newer, kernel.
Cheers,
Carlos.