Re: perl segfault - how to troubleshoot

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Quoted text here. Click to load it

(just for the record) The motto of c.t.t is: "Please provide complete
minimal example that clearly exhibits your problem".  Point.


[To: all]

perl -wle '
$x = q|abc|;
q|zyx| =~ m[(??{ q|zyx| =~ m,[$x-]+, })]'
Out of memory!

If B<perl> is replaced with B<debugperl> (that's the Perl of Debian
built with I<DEBUGGING> enabled, then tail is:

Matching embedded REx "" against ""...
104520 <zyx%0%0%0%0%0!%0%0%0%340%255P%tX%255P%t%320%355%16%10%3%0%0> <>|
1:  NOTHING(2)
104520 <zyx%0%0%0%0%0!%0%0%0%340%255P%tX%255P%t%320%355%16%10%3%0%0> <>|
2:  END(0)
                                    EVAL trying tail ... 0
104520 <zyx%0%0%0%0%0!%0%0%0%340%255P%tX%255P%t%320%355%16%10%3%0%0> <>|
4:    END(0)
Freeing REx: ""
Match successful!
panic: malloc at -e line 1.
Freeing REx: "(??{ q|zyx| =~ m,[$x-]+, })"
Freeing REx: "[abc-]+"
panic: free from wrong pool.

Some time ago when I'd experimented with that construct (I insist, I had
a reason) then that beast segfaulted too.  This sample doesn't.  That
wasn't one-liner after all.

Torvalds' goal for Linux is very simple: World Domination

Site Timeline