This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: apps built w/ -fstack-protector-all segfault


On Mon, 14 Nov 2005, Eric Christopher wrote:

> >
> >> apps built w/ -fstack-protector-all segfault
> >
> > You will have to give us more info.  Most gcc developers probably  
> > don't have a copy of UClibc, and plus it sounds like you have made  
> > gcc changes that weren't included in your message.  So there isn't  
> > much we can do here except ask for more details.  Try debugging the  
> > problem.  If you can identify a specific problem here, and give us  
> > details about it, we can probably help.
> 
> Also since __builtin_trap is used in the fail mechanism the comment  
> above the trap instruction in i386.md might be useful:

This is only true is libssp.so is used, I am using "established, working" 
exit code, that worked w/ earlier ssp as well (when it was not 
integrated) I mentioned that I use it as integrated into libc (exactly 
like glibc-cvs does), glibc uses libc_message iirc for exit.

this should also influence the -fstack-protector behaviour, but that seems 
to be OK.
__builtin_trap is used as I can see only if a vulnerability is found, this 
happens though on a simple hello world.

Thanks, Peter

> 
> ;; We used to use "int $5", in honor of #BR which maps to interrupt  
> vector 5.
> ;; That, however, is usually mapped by the OS to SIGSEGV, which is often
> ;; caught for use by garbage collectors and the like.  Using an insn  
> that
> ;; maps to SIGILL makes it more likely the program will rightfully die.
> ;; Keeping with tradition, "6" is in honor of #UD.
> 
> So you may be seeing something mapped odd, or...
> 
> -eric
> 
> 

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2


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