[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/0.7.3.0 |
My brother Abramo discovered that this behaviour is due to
a misfeature of GNU Make, whose main procedure contains:
#ifdef SET_STACK_SIZE
/* 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);
}
else
stack_limit.rlim_cur = 0;
}
#endif
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 (http://savannah.gnu.org/bugs/index.php?22010)
has been fixed in GNU Make 3.82, just released.
Thanks again to everyone,
Roberto
--
Prof. Roberto Bagnara
Applied Formal Methods Laboratory
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:address@hidden