[Top][All Lists]

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

Re: On Ubuntu 10.4, test programs that segfault do XPASS

From: Roberto Bagnara
Subject: Re: On Ubuntu 10.4, test programs that segfault do XPASS
Date: Mon, 23 Aug 2010 08:18:01 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050929 Thunderbird/1.0.7 Fedora/1.0.7-1.1.fc4 Mnenhy/

My brother Abramo discovered that this behaviour is due to
a misfeature of GNU Make, whose main procedure contains:

 /* Get rid of any avoidable limit on stack size.  */
    struct rlimit rlim;

    /* Set the stack limit huge so that alloca does not fail.  */
    if (getrlimit (RLIMIT_STACK, &rlim) == 0
        && rlim.rlim_cur > 0 && rlim.rlim_cur < rlim.rlim_max)
        stack_limit = rlim;
        rlim.rlim_cur = rlim.rlim_max;
        setrlimit (RLIMIT_STACK, &rlim);
      stack_limit.rlim_cur = 0;

This limit is never restored again.

The Fedora package ships GNU Make 3.81 along with a patch that
restores the original rlimit before executing programs via execvp(),
and this explains why the problem was not reproducible there.

This bug of GNU Make (
has been fixed in GNU Make 3.82, just released.
Thanks again to everyone,


Prof. Roberto Bagnara
Applied Formal Methods Laboratory
Department of Mathematics, University of Parma, Italy

reply via email to

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