bug-bash
[Top][All Lists]
Advanced

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

Re: Bash crashes with trapped SIGCHLD and read -t.


From: konsolebox
Subject: Re: Bash crashes with trapped SIGCHLD and read -t.
Date: Fri, 25 Jan 2013 23:44:59 +0800

I really appreciate that. Thank you very much :)
My software would finally work in a loop with no worries.

OK, I was able to figure it out.  The problem is that the `read -t'
> generates SIGALRM, which sometimes arrives and is handled while the SIGCHLD
> trap is running (bash-4.2 runs the SIGCHLD trap immediately).  This
> violates assumptions bash makes about the state of the unwind-protect
> stack, and results in a double free because the free bash thinks it's
> avoiding actually happens.
>
> The real fix is coming in the next release of bash, with an extensive
> reworking of how signal handlers and traps are run, but the attached
> patch should be able to get you through the seg fault.
>
> Chet
>


reply via email to

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