This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Corrupt filename when setting %INC entry in a @INC hook
authorSalvador Ortiz Garcia <sog@msg.com.mx>
Sun, 6 Sep 2009 21:41:57 +0000 (23:41 +0200)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Sun, 6 Sep 2009 21:41:57 +0000 (23:41 +0200)
commitd8723a6a74b2c12e9d732728dbe717672ab893f2
tree24f0470722ebc791b8faebc46444e8c649c2894b
parentacb65a20b3f3b0f0cee262142e279624eaae58bb
Corrupt filename when setting %INC entry in a @INC hook

The code in pp_ctl.c after calling an @INC hook blindly assumes that the
SV setted by the user in %INC is an SVPV (SvPOK true) for setting the
filename. So when the user uses other scalar types, the output of
__FILE__, warn, die, caller, etc. shows random garbage.
pp_ctl.c