In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/1b77350017006d9e581d4eda49c59b68e408f51b?hp=6bf48f47bbdbe4838b70d67830ead4ebc3d318d4>

- Log -----------------------------------------------------------------
commit 1b77350017006d9e581d4eda49c59b68e408f51b
Author: Nicholas Clark <[email protected]>
Date:   Mon Mar 25 13:06:09 2013 +0100

    xs_init() must pass a static char* when creating 
&DynaLoader::boot_DynaLoader.
    
    newXS() assumes that the passed pointer to the filename is in static 
storage,
    or otherwise will outlive the PVCV that it is about to create, and hence 
that
    it's safe to copy the pointer, not the value, to CvFILE.  Hence xs_init()
    must not use an auto array to "store" the filename, as that will be on the
    stack, and becomes invalid as soon as xs_init() returns.  The analogous bug
    fix was made in universal.c by commit 157e3fc8c802010d in Feb 2006.
    
    Spotted by compiling for ithreads with gcc 4.8.0's ASAN and running
    dist/B-Deparse/t/deparse.t
-----------------------------------------------------------------------

Summary of changes:
 minimod.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/minimod.pl b/minimod.pl
index a5bd172..a59b7f2 100644
--- a/minimod.pl
+++ b/minimod.pl
@@ -71,7 +71,7 @@ sub writemain{
     my ($tail1,$tail2,$tail3) = ( $tail =~ /\A(.*{\s*\n)(.*\n)(\s*\}.*)\Z/s );
 
     print $tail1;
-    print "\tconst char file[] = __FILE__;\n";
+    print "\tstatic const char file[] = __FILE__;\n";
     print "\tdXSUB_SYS;\n" if $] > 5.002;
     print $tail2;
 

--
Perl5 Master Repository

Reply via email to