develooper Front page | perl.perl5.porters | Postings from November 2010

Re: [perl #79838] -fstack-protector enabled without any way todisable, even on platforms not supporting it

Thread Previous | Thread Next
From:
Andy Dougherty
Date:
November 28, 2010 11:28
Subject:
Re: [perl #79838] -fstack-protector enabled without any way todisable, even on platforms not supporting it
Message ID:
alpine.DEB.2.00.1011281416100.2563@fractal.phys.lafayette.edu
On Fri, 26 Nov 2010, perlbug @ plan9 . de wrote:

> # New Ticket Created by  perlbug@plan9.de 
> # Please include the string:  [perl #79838]
> # in the subject line of all future correspondence about this issue. 
> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=79838 >

> beginning with 5.10.something, perl enforces the use of -fstack-protector,
> even when Configure was explicitly told the compiler flags, and there is
> no way to switch it off.

I agree with your general premise that it should be possible to get 
Configure to do what you need it to do in order to build perl the way you 
want to build it.

I should point out, however, that while it isn't easy, it is possible to 
turn it off by running Configure interactively and removing it when 
prompted.

> unfortunately, gcc supports this flag on most platforms, even if the
> underlying support is missing. simple test programs (sucha s the one
> used by Configure) might pass, but the generated programs might segfault
> or worse (for exmaple, on uclibc systems, all the cast to float tests
> segfault).

I wasn't aware that gcc might be misleading us this way.  If you could 
supply us with a better test program, that would be very helpful.

> besides, it would be nice not to enforce the use of certain compiler
> flags that are absoltuely unnecessary (perl works fine without
> -fstack-protector).
> 
> so... please please please make -fstack-protector configurable somehow,
> better yet, don't override user-specified flags and/or improve the tets
> for platform support.

Unfortunately, other users do rely on us supplementing the user-specified 
C flags, so I don't think we can win there no matter what we do.  There 
might be some clever approach, but it's not occurring to me at the moment.

Meanwhile, yes, an improved test program would likely be a very good idea.

-- 
    Andy Dougherty		doughera@lafayette.edu


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About