[Top][All Lists]

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

Re: 3-lines long segfault

From: Marc Herbert
Subject: Re: 3-lines long segfault
Date: Mon, 20 Jul 2009 09:21:25 +0100
User-agent: Thunderbird (X11/20090320)

Chet Ramey a écrit :
> Marc Herbert wrote:
>> The following script crashes bash versions 2.05, 3.2.25, 4.0.16,...
>> trap "echo USR1caught" USR1
>> read -t 1
>> foo=$( kill -USR1 $$ )
>> echo 'Yeah! no Segmentation fault!'
> Thanks for the report.

Thanks for bash in the first place.

> Fixed in the next version.

Chet, is there any workaround for existing versions?

I mean, there must be some memory corruption involved in here, so is it 
possible to dodge it without upgrading? For instance, would simply avoiding the 
"-t" option of "read" be enough to guarantee no memory corruption? Other? 
Thanks a lot in advance!

I know: the answer to this question is probably in the latest revision of the 
source code, but... I doubt I will fully understand what is happening there. 
And I am surely not the only one in this case.



reply via email to

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