Re: mprotect reports ENOMEM under -O2

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

 



On Apr 10, 2011, at 3:18 PM, Ian Lance Taylor wrote:

> To be clear, if I understand your background correctly, your
> modification of gcc is intended to modify the generated code.  That is,
> you mhave not modified gcc such that gcc itself calls mprotect from a
> signal handler.  You have modified gcc such that it generates code which
> calls mprotect from a signal handler.
> 
> Your problem is that when gcc is compiled with -O2, the code that it
> generates does not work correctly.

Yes.  That is correct.

> If that is correct, then you should look closely at the code you have
> added to gcc, and make sure that you have not introduced undefined
> behaviour into gcc itself.  It may help to use the -Wstrict-aliasing and
> -Wstrict-overflow options.  It would be interesting to learn whether
> your gcc also fails if you compile with -O2 -fno-strict-aliasing and/or
> -O2 -fno-strict-overflow.
> 
> Ian

Thanks!  I'll give those ideas a try.

Amittai Aviram
PhD Student in Computer Science
Yale University
646 483 2639
amittai.aviram@xxxxxxxx
http://www.amittai.com



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux