Re: [GD-Windows] Strange prolog function issue
Brought to you by:
vexxed72
From: Kent Q. <ken...@co...> - 2006-07-25 16:10:17
|
Emmanuel Astier wrote: > Hi all, > > > I have here a very strange issue. > > We have a function using a local std::string, exceptions, and a alloca. > > When the exception is thrown, the unwind mecanism tries to delete the std::string, but it deletes it at a wrong address( there is a 0x590 offset ). > > <snip> > > I could not reproduce this ebp offset that makes the exception handler fail in a small sample. > So do you know in which case the compiler does not put esp in ebp, but put an offset in it ? > And do you know how to fix it ( other than what we're doing : stopping using alloca with exceptions ), if it is a kind a known issue ? > Does the bug occur in both debug and release builds? Have you tried setting the optimization manually for that file? In any large project, I usually find a couple of files that drive some form of compiler bug under full optimization, and I have to manually turn down the optimization on that particular file or do some sort of special (heavily commented!) adaptation, such as moving a function's location in the source file, or in the header file. You might also try playing with a couple of exception-related compiler switches. Compilers are complicated beasts, and any project of a significant size is likely to drive a bug or two. |