This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
eval $overloaded can crash
authorDavid Mitchell <davem@iabyn.com>
Tue, 22 Jun 2010 23:23:24 +0000 (00:23 +0100)
committerDavid Mitchell <davem@iabyn.com>
Sat, 3 Jul 2010 15:25:58 +0000 (16:25 +0100)
commit3e5c01898a8b319439f67ce035bfc80fb80b4f3b
treed08ac57600b29264ce02c1600f3b1094130a62ea
parenta02ec77af3235fc3d744725d93fbef7d9126695a
eval $overloaded can crash

Perl_lex_start() assumes that the SV passed to it is a well-behaved
string that it can do PVX() stuff to. If it's actually a ref to an
overloaded object, it can crash and burn. Fixed by creating a stringified
copy of the SV if necessary.
t/op/eval.t
toke.c