bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xmalloc crash


From: Chet Ramey
Subject: Re: xmalloc crash
Date: Mon, 8 Jan 2018 11:35:48 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 1/7/18 2:27 AM, Eduardo A. Bustamante López wrote:

> 
> This is not related to Linux VM overcommit / OOM killer.
> 
> 
> From what I can see, Bash's internal memory allocator (lib/malloc/malloc.c,
> internal_malloc) is actually unable to allocate the ~580 MiB of VM, even if
> there's enough free physical memory to back it up.

That's the wrong number. The request is for 7329062664 bytes, which is
between 2**32 and 2**33 (around 7 gig) and so exceeds the maximum request
size:

bash: xmalloc: .././braces.c:793: cannot allocate 7329062664 bytes
(614682624 bytes allocated)

The 614682624 is the amount of memory the bash malloc has already obtained
from the kernel (the difference between the break at the first call to
malloc and the call when malloc failed).

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]