develooper Front page | perl.perl5.porters | Postings from October 2011

[perl #101336] d527ce7c pp_caller UTF8 cleanup broke B::C XSLoader

From:
Reini Urban
Date:
October 13, 2011 16:24
Subject:
[perl #101336] d527ce7c pp_caller UTF8 cleanup broke B::C XSLoader
Message ID:
rt-3.6.HEAD-31297-1318548229-276.101336-75-0@perl.org
# New Ticket Created by  Reini Urban 
# Please include the string:  [perl #101336]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=101336 >


This is a bug report for perl from rurban@cpan.org,
generated with the help of perlbug 1.39 running under perl 5.14.2.


-----------------------------------------------------------------
This commit d527ce7c3632e2eaebee9f962268da87e0becd51
Author: Brian Fraser <fraserbn@gmail.com>
Date:   Mon Sep 26 15:32:45 2011 -0700

    pp_ctl.c: pp_caller UTF8 cleanup.

using the stash hek instead of the stash name broke the B::C compiler,
esp. for XSLoader, loading dynamic modules from within C.
Overwriting the static cop with the new HEK fails with

#0  0x00007fff812fd0b6 in __kill ()
#1  0x00007fff8139d9f6 in abort ()
#2  0x00007fff8138a9bc in __assert_rtn ()
#3  0x00000001002ae422 in S_unshare_hek_or_pvn (hek=0x10062d1e8,
str=0x0, len=0, hash=0) at hv.c:2588
#4  0x00000001002ae3a6 in Perl_unshare_hek (hek=0x10062d1e8) at hv.c:2561
#5  0x000000010030da9c in Perl_sv_force_normal_flags (sv=0x1000cf990,
flags=4) at sv.c:4829
#6  0x000000010030c4a8 in Perl_sv_usepvn_flags (sv=0x1000cf990,
ptr=0x100608650 "Data::Dumper", len=12, flags=256) at sv.c:4659
#7  0x000000010030c08b in Perl_sv_sethek (sv=0x1000cf990,
hek=0x100608648) at sv.c:4618
#8  0x00000001003974ad in Perl_pp_caller () at pp_ctl.c:1911
#9  0x000000010025d2af in Perl_runops_debug () at dump.c:2201
#10 0x000000010017ab91 in Perl_call_sv (sv=0x1000c96b0, flags=5) at perl.c:2665
#11 0x000000010017a56e in Perl_call_pv (sub_name=0x1000a4b8d
"XSLoader::load", flags=5) at perl.c:2568
#12 0x000000010009fd20 in dl_init () at ccode45.c:28187

This was not an issue with the stashname.
Repro:
$ cpan B::C
$ t/testc.sh 45

I found no way to workaround this.
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=high
---
Site configuration information for perl 5.14.2:

Configured by rurban at Tue Sep 27 12:28:28 CDT 2011.

Summary of my perl5 (revision 5 version 14 subversion 2) configuration:

  Platform:
    osname=darwin, osvers=10.8.0, archname=darwin-x86-64-nothreads
    uname='darwin air.local 10.8.0 darwin kernel version 10.8.0: tue
jun 7 16:33:36 pdt 2011; root:xnu-1504.15.3~1release_i386 i386 '
    config_args='-de -Dusedtrace -Dmksymlinks -Doptimize=-Os
-Uuseithreads -Dcc=gcc-mp-4.6 -Accflags=-m64 -Duseshrplib
-Dld=gcc-mp-4.6 -Accflags=-mssse3 -Darchname=darwin-x86-64-nothreads'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc-mp-4.6', ccflags ='-fno-common -DPERL_DARWIN -m64 -mssse3
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-I/opt/local/include',
    optimize='-Os',
    cppflags='-fno-common -DPERL_DARWIN -m64 -mssse3
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-I/opt/local/include'
    ccversion='', gccversion='4.6.1 20110325 (prerelease)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='
-fstack-protector -L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib /opt/local/lib /usr/lib
    libs=-lgdbm -ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    libc=, so=dylib, useshrplib=true, libperl=libperl.dylib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup
-L/usr/local/lib -L/opt/local/lib -fstack-protector'

Locally applied patches:


---
@INC for perl 5.14.2:
    /usr/local/lib/perl5/site_perl/5.14.2/darwin-x86-64-nothreads
    /usr/local/lib/perl5/site_perl/5.14.2
    /usr/local/lib/perl5/5.14.2/darwin-x86-64-nothreads
    /usr/local/lib/perl5/5.14.2
    /usr/local/lib/perl5/site_perl/5.14.1
    /usr/local/lib/perl5/site_perl/5.14.0
    /usr/local/lib/perl5/site_perl/5.10.1
    /usr/local/lib/perl5/site_perl/5.8.9
    /usr/local/lib/perl5/site_perl/5.6.2
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl 5.14.2:
    DYLD_LIBRARY_PATH (unset)
    HOME=/Users/rurban
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LC_CTYPE=en_US.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/opt/local/libexec/gnubin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/rurban/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash

-- 
Reini Urban
http://cpanel.net/   http://www.perl-compiler.org/




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About