Subject: Re: program built with -O2 exits on receiving SIGWINCH
To: Hiroshi SAKURAI <an.olive.tree@gmail.com>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-users
Date: 02/27/2006 00:07:53
On Feb 27,  1:55pm, an.olive.tree@gmail.com ("Hiroshi SAKURAI") wrote:
-- Subject: Re: program built with -O2 exits on receiving SIGWINCH

| On 2/27/06, Christos Zoulas <christos@astron.com> wrote:
| >
| > The problem is that with -O2 the optimizer changes the call to "func"
| > to a jump, so the stack frame is off when the signal handler returns,
| > and we end up calling setcontext(0).
| >
| > christos
| 
| Does it mean that -O2 must not be used to compile signal handler
| or NetBSD should be fixed?

I think it is a compiler issue because we push two frames and we pop one.

christos