-fexceptions? -fasync-unwind-tables?

Gregory M. Turner gmturner007 at ameritech.net
Mon May 12 07:06:19 CDT 2003

OK, as you may have guessed, I'm still driving myself insane trying to fix 
__try and friends.  I have some other less promising ideas on the backburner; 
this one seemed to have sufficient potential that I thought I would ask the 
group to let me know what they think.

In short: gcc accepts the above options.  The first, is considered to be a C++ 
compatibility mode in C.  That is to say, it provides the right glue such 
that exceptions can unwind through calls to C libraries.  If /any/ library in 
the call-chain leaves this option out, I'm afraid it breaks down.

The second, -fasync-unwind-tables, provides "dwarf2 unwind tables".  I've 
looked through the dwarf2 spec and some other sources, but I have yet to find 
solid documentation for this... perhaps it's a "use the source, Luke" 
situation.  But this second option promises "instruction-granularity" unwind 
tables of some kind.  IOW, presumably, this would be enough to implement 
__try and friends without looking beyond the stack pointer.

As for the idea of stealing the return pointer on the stack.  I like it even 
less now.  It appears that signal handlers are allowed to clobber the stack 
above the SP on some architectures, which means we're pretty much up a creek.
There still might be some ultra-clever work-around involving copying the 
current stack frame, but I think we would at least have to create our own 
trampolines in asm, which, I fear, might break in subsequent gcc releases...

So... anybody know where these options are actually documented?  I mean, I see 
the blurb in the info pages, which is enticing, but surely there is some API 
or datastructure to look at somewhere....

"Security is mostly superstition. It does not exist in nature,
nor do the children of men as a whole experience it. Avoiding
danger is no safer in the long run than outright exposure. Life is
either a daring adventure, or nothing. To keep our faces toward
change and behave like free spirits in the presence of fate is
strength undefeatable." --Helen Keller


More information about the wine-devel mailing list