This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: stack_info::walk and alloca don't mix


On 03/05/2011 11:43 AM, Corinna Vinschen wrote:
On May 3 10:59, Ryan Johnson wrote:
Hi all,

FYI in case anyone else has been seeing strange crashes inside calls
to api_fatal():

It seems that functions which use alloca() set up a non-standard
stack frame which confuses both stack_info::walk and windbg. The
former tends to either enter an infinite loop or end up executing
code in la-la land; the latter crashes instantly. Worse, if an
I'm not really concerned about windbg.  What about just fixing
stack_info::walk so that at least it doesn't enter an infinite loop?
Agree about windbg, though the instadeath makes it hard to debug certain dll initialization bugs I'm trying to hunt down.

The problem is, I don't know how to reliably prevent stack_info::walk going to la-la land. It's pure luck whether it crashes directly, goes into an infinite loop, or goes into the crash-dump-crash loop. The middle case we could avoid for the simple
case of a bp which points to itself, but not longer cycles. The other two are just hard.


If you have any ideas on how I could detect at least some of the failures modes, I'd be happy to investigate them further, though.

Ryan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]