Re: [perl #56712] [BUG] --optimize causes perl6 to segfault during make

[email protected] (Will Coleda) Tue, 22 Sep 2009 15:43:45 -0400
Newsgroups perl.perl6.internals
Message-ID <[email protected]>
On Tue, Sep 22, 2009 at 3:30 PM, Andy Dougherty <[email protected]> wr=
ote:
> On Tue, 22 Sep 2009, Nicholas Clark wrote:
>
>> On Tue, Sep 22, 2009 at 02:22:17PM -0400, Andy Dougherty wrote:
>> > On Tue, 22 Sep 2009, Will Coleda via RT wrote:
>> >
>> > > On Tue Jul 08 20:56:02 2008, s1n wrote:
>> > > > When trying to use the --optimize flag, building perl6 causes parr=
ot
>> > > to
>> > > > segfault. Attached is the Configure.pl script output.
>> > > <SNIP>
>> > >
>> > > s1n - this original report is over a year old; there have been a lot=
 of
>> > > changes to both parrot and rakudo in that time; we've also just
>> > > committed something that should cause the optimized build to at leas=
t
>> > > fail more cleanly if there's a problem (which we can then more easil=
y
>> > > identify and resolve.)
>> >
>> > Actually, all those ASSERT_ARGS checks aren't used in the --optimize b=
uild
>> > anyway. =A0Applying the following patch should enable them, assuming t=
hat's
>> > what is actually intended.
>>
>> I don't think that it's absolutely necessary.
>
> I would tend to agree, but Coke seemed to be implying that the intent was
> otherwise.

Apologies. I think you and Nick are right on this.

>> The intent (at least in Perl 5 land) was to have the non-optimised build
>> spot all the places where the non-NULL annotations were wrong, on the
>> assumption that the code paths would be identical in the optimised and
>> non-optimised builds.
>
> (One of the strange things about this report is that the failure only
> happens with --optimize. =A0And not just this report -- this has been an
> issue on and off for years. =A0But that probably doesn't really have
> anything to do with ASSERT_ARGS.)
>
> More generally, whatever the default setting, it might be nice to have a
> way to change it. =A0I could easily imagine
>
> =A0 =A0 =A0 =A0perl Configure.pl --optimize=3D-O --debugging=3D1
>
> turning on the optimizer while still enabling all the -DNDEBUG checks, an=
d
>
> =A0 =A0 =A0 =A0perl Configure.pl --optimize=3D-O --debugging=3D0
>
> turning on the optimizer and leaving out all the -DNDEBUG checks.
>
> Right now, that --optimize unconditionally leaves out the -DNDEBUG checks=
,
> and the -debugging ends up doing nothing useful at all in those two
> cases.
>
> --
> =A0 =A0Andy Dougherty =A0 =A0 =A0 =A0 =A0 =A0 [email protected]
> _______________________________________________
> http://lists.parrot.org/mailman/listinfo/parrot-dev
>

I regularly do 'perl Configure.pl --optimize --ccflags=3D-g' , which
probably isn't quite the same thing but might be useful.

--=20
Will "Coke" Coleda