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

Hardening via random code generator (was: [perl #74764] -E 'given(goto f ) { f: }' => crash)

Thread Next
From:
Tim Bunce
Date:
April 30, 2010 02:04
Subject:
Hardening via random code generator (was: [perl #74764] -E 'given(goto f ) { f: }' => crash)
Message ID:
20100430090413.GB2056@timac.local
> The following code crashes perl:
> 
>         % perl5.12.0 -E 'given ( goto f ) { f: }'
>         Use of "goto" to jump into a construct is deprecated at -e line 1.
>         perl5.12.0: pp_ctl.c:4005: Perl_pp_leavegiven: Assertion `((cx)->cx_u.cx_subst.sbu_type & 0xf) == 3' failed.
>         zsh: abort      /opt/perl/perl-5.12.0-RC3/bin/perl5.12.0 -E 'given ( goto f ) { f: }

This report triggers vague memories of a tool (not perl related) that
generated random code fragments in an attempt to find flaws in a
compiler or cpu (I forget which now). Ring a bell for anyone?

> Yes, no one would do this.
> But perl should not crash, too.

Exactly.

An interesting project for someone: a tool that generates random perl
code fragments in an attempt to find crashing bugs in perl.

Tim.

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