rafl / twigils Goto Github PK
View Code? Open in Web Editor NEWTwigils for Perl 5
Twigils for Perl 5
Taking a reference to a twigil variable causes a segfault, when no autovivification
is loaded after twigils. Code to reproduce:
# no autovivification; # loading this first would prevent segfault
use twigils;
intro_twigil_my_var $!bomb;
no autovivification;
\($!bomb); # taking a reference triggers segfault
Tested with twigils v0.04, perl v5.18.1.
Context: The p5-mop project casts Variable::Magic
onto twigils, which involves an \$
prototype. The result is that code like this dies:
use mop; no autovivification; # order is important
class Foo {
has $!unused;
method segfault {
# bad code is injected here
42
}
}
Foo->segfault;
cpanm (App::cpanminus) 1.6005 on perl 5.016003 built for MSWin32-x64-multi-thread
Work directory is C:\Users\Andre/.cpanm/work/1378254285.8988
You have make C:\strawberry5.16\c\bin\dmake.exe
You have LWP 6.04
You have "C:\Program Files (x86)\Git\bin\tar.exe", "C:\Program Files (x86)\Git\bin\gzip.exe" and "C:\Program Files (x86)\Git\bin\bzip2.exe"
You have "C:\Program Files (x86)\Git\bin\unzip.exe"
--> Working on http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/twigils-0.03-TRIAL.tar.gz
Fetching http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/twigils-0.03-TRIAL.tar.gz
-> OK
Unpacking twigils-0.03-TRIAL.tar.gz
Entering twigils-0.03
Checking configure dependencies from META.json
Checking if you have Devel::CallChecker 0 ... Yes (0.005)
Checking if you have IO::File 0 ... Yes (1.16)
Checking if you have ExtUtils::MakeMaker 6.30 ... Yes (6.64)
Checking if you have Devel::CallParser 0 ... Yes (0.001)
Configuring twigils-0.03
Running Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for twigils
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Test::More 0 ... Yes (0.98)
Checking if you have Test::Fatal 0 ... Yes (0.010)
Checking if you have warnings 0 ... Yes (1.13)
Checking if you have XSLoader 0 ... Yes (0.16)
Checking if you have Exporter 0 ... Yes (5.67)
Checking if you have Carp 0 ... Yes (1.26)
Checking if you have Devel::CallChecker 0 ... Yes (0.005)
Checking if you have strict 0 ... Yes (1.07)
Checking if you have Devel::CallParser 0 ... Yes (0.001)
Building and testing twigils-0.03
cp lib/twigils.pm blib\lib\twigils.pm
C:\strawberry5.16\perl\bin\perl.exe C:\strawberry5.16\perl\lib\ExtUtils\xsubpp -typemap C:\strawberry5.16\perl\lib\ExtUtils\typemap twigils.xs > twigils.xsc && C:\strawberry5.16\perl\bin\perl.exe -MExtUtils::Command -e mv -- twigils.xsc twigils.c
gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields -I. -s -O2 -DVERSION="0.03" -DXS_VERSION="0.03" "-IC:\strawberry5.16\perl\lib\CORE" twigils.c
Running Mkbootstrap for twigils ()
C:\strawberry5.16\perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 twigils.bs
C:\strawberry5.16\perl\bin\perl.exe -MExtUtils::Mksymlists
-e "Mksymlists('NAME'=>"twigils", 'DLBASE' => 'twigils', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
dlltool --def twigils.def --output-exp dll.exp
g++ -o blib\arch\auto\twigils\twigils.dll -Wl,--base-file -Wl,dll.base -mdll -s -L"C:\strawberry5.16\perl\lib\CORE" -L"C:\strawberry5.16\c\lib" twigils.o C:\strawberry5.16\perl\lib\CORE\libperl516.a -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp
twigils.o:twigils.c:(.text+0x7a0): undefined reference to __imp_Perl_oopsHV' twigils.o:twigils.c:(.text+0x7c7): undefined reference to
__imp_Perl_list'
twigils.o:twigils.c:(.text+0xa0e): undefined reference to __imp_Perl_scalar' twigils.o:twigils.c:(.text+0xa1f): undefined reference to
__imp_Perl_oopsAV'
twigils.o:twigils.c:(.text+0xa8d): undefined reference to __imp_Perl_jmaybe' twigils.o:twigils.c:(.text+0xa9e): undefined reference to
__imp_Perl_oopsHV'
twigils.o:twigils.c:(.text+0xaf0): undefined reference to __imp_Perl_list' twigils.o:twigils.c:(.text+0x1024): undefined reference to
__imp_C8K61oRQKxigiqmUlVdk_scp1'
c:/strawberry5.16/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: twigils.o: bad reloc address 0x0 in section `.pdata'
c:/strawberry5.16/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: final link failed: Invalid operation
collect2: ld returned 1 exit status
dmake.exe: Error code 129, while making 'blib\arch\auto\twigils\twigils.dll'
-> FAIL Installing http://search.cpan.org/CPAN/authors/id/F/FL/FLORA/twigils-0.03-TRIAL.tar.gz failed. See C:\Users\Andre.cpanm\build.log for details.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.