Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embeded die calls printf, unlike non-embeded version #3965

Open
p5pRT opened this issue May 6, 2001 · 2 comments
Open

embeded die calls printf, unlike non-embeded version #3965

p5pRT opened this issue May 6, 2001 · 2 comments

Comments

@p5pRT
Copy link

p5pRT commented May 6, 2001

Migrated from rt.perl.org#6964 (status was 'open')

Searchable as RT6964$

@p5pRT
Copy link
Author

p5pRT commented May 6, 2001

From wsnyder@world.std.com

die("%Error") called from a normal script shows
  %Error
die("%Error") called from a embeded perl interpreter shows
  -1.994850E+00rror​:

Which makes me suspect something is calling printf/sprintf
which normally doesn't. It isn't perl_parse_ev's fault, as
the same problem occurs if the die is in a script that is sourced.

begin 666 die_calls_printf.tar.gz
M9&EE7V-A;&QS7W!R​:6YT9B]D​:65?8V%L;'-?<')I;G1F+F,`````````````
M````````````````````````````````````````````````````````````
M`````````````#`Q,#`V-C8`,#`P,3<W,0`P,#`P,30U`#`P,#`P,#`Q,3`S
M`#`W,C8W,3,P-3,V`#`Q-S0R,@​`@​,```````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!U<W1A<B`@​`'=S;GED
M97(`````````````````````````````````​:'=E;F<`````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````C​:6YC;'5D92`\<W1D;&EB+F@​^"B-I;F-L=61E
M(#Q%6%1%4DXN​:#X@​("`@​("`@​("`@​("`@​("`O*B!F<F]M('1H92!097)L(&1I
M<W1R​:6)U=&EO;B`@​("`@​*B\*(VEN8VQU9&4@​/'!E<FPN​:#X@​("`@​("`@​("`@​
M("`@​("`@​("\J(&9R;VT@​=&AE(%!E<FP@​9&ES=')I8G5T​:6]N("`@​("`J+PH*
M+RHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ
M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHO"B\J($QO8V%L<R`J+PH*<W1A
M=&EC(%!E<FQ);G1E<G!R971E<B`J<&-L​:5]P97)L.R`@​+RHJ*B`@​("!4​:&4@​
M4&5R;"!I;G1E<G!R971E<B`@​("`J*BHO"@​II;G0@​;6%I;BAI;G0@​87)G8RP@​
M8VAA<B`J*F%R9W8L(&-H87(@​*BIE;G8I"GL*("`@​(&-H87(@​*F%R9W-;72`]
M('L@​(G!E<FPB+"`B+64B+"`B,"(@​?3L*("`@​('!C;&E?<&5R;"`]('!E<FQ?
M86QL;V,H*3L*("`@​('!E<FQ?8V]N<W1R=6-T*'!C;&E?<&5R;"D["B`@​("!P
M97)L7W!A<G-E*'!C;&E?<&5R;"P@​3E5,3"P@​,RQA<F=S+"`H8VAA<B`J*BE.
M54Q,*3L*("`@​('!E<FQ?979A;%]P=B`H(F1I92`G)45R<F]R.B!B87HG.R(L
M(%12544I.PI]"@​H`````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````9&EE7V-A;&QS7W!R​:6YT9B],3T<`````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````#`Q,#`V-C8`,#`P,3<W,0`P,#`P,30U`#`P,#`P
M,#`T,#<V`#`W,C8W,3,Q,3$U`#`Q-#,R-P`@​,```````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````!U<W1A<B`@​
M`'=S;GED97(`````````````````````````````````​:'=E;F<`````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````!C9"`O​:&]M92]W<VYY9&5R+U-A;F1"
M;W@​O;FXM,C`P,"]S​:6TO<&-L​:2]E>"\*;6%K90IP97)L("U-0V]N9FEG("UE
M("=P<FEN="!#;VYF​:6<Z.FUY8V]N9FEG*"D[)PI3=6UM87)Y(&]F(&UY('!E
M<FPU("AR979I<VEO;B`U+C`@​=F5R<VEO;B`V('-U8G9E<G-I;VX@​,"D@​8V]N
M9FEG=7)A=&EO;CH*("!0;&%T9F]R;3H*("`@​(&]S;F%M93UL​:6YU>"P@​;W-V
M97)S/3(N,BXU+3(R<VUP+"!A<F-H;F%M93UI,S@​V+6QI;G5X"B`@​("!U;F%M
M93TG;&EN=7@​@​<&]R​:WDN9&5V96PN<F5D​:&%T+F-O;2`R+C(N-2TR,G-M<"`C
M,2!S;7`@​=V5D(&IU;B`R(#`Y.C$Q.C4Q(&5D="`Q.3DY(&DV.#8@​=6YK;F]W
M;B`G"B`@​("!C;VYF​:6=?87)G<STG+61E<R`M1&]P=&EM​:7IE/2U/,B`M;6%R
M8V@​]​:3,X-B`M;6-P=3UI-C@​V("U$8V,]9V-C("U$8V-C9&QF;&%G<STM9E!)
M0R`M1&EN<W1A;&QP<F5F​:7@​]+W5S<B`M1'!R969I>#TO=7-R("U$87)C​:&YA
M;64]​:3,X-BUL​:6YU>"`M1&1?9&]S=6ED("U$9%]S96UC=&Q?<V5M=6X@​+41I
M7V1B("U$​:5]N9&)M("U$​:5]G9&)M("U$​:5]S​:&%D;W<@​+41I7W-Y<VQO9R`M
M1&UA;C-E>'0],W!M("U5=7-E;&%R9V5F​:6QE<R<*("`@​(&AI;G0]<F5C;VUM
M96YD960L('5S97!O<VEX/71R=64L(&1?<VEG86-T​:6]N/61E9FEN90H@​("`@​
M=7-E=&AR96%D<SUU;F1E9B!U<V4U,#`U=&AR96%D<SUU;F1E9B!U<V5I=&AR
M96%D<SUU;F1E9B!U<V5M=6QT​:7!L​:6-I='D]=6YD968*("`@​('5S97!E<FQI
M;SUU;F1E9B!D7W-F​:6\]=6YD968@​=7-E;&%R9V5F​:6QE<SUU;F1E9B`*("`@​
M('5S938T8FET​:6YT/75N9&5F('5S938T8FET86QL/75N9&5F('5S96QO;F=D
M;W5B;&4]=6YD968@​=7-E<V]C​:W,]=6YD968*("!#;VUP​:6QE<CH*("`@​(&-C
M/2=G8V,G+"!O<'1I;6EZ93TG+4\R("UM87)C​:#UI,S@​V("UM8W!U/6DV.#8G
M+"!G8V-V97)S​:6]N/3(N.38@​,C`P,#`W,S$@​*&5X<&5R​:6UE;G1A;"D*("`@​
M(&-P<&9L86=S/2<M9FYO+7-T<FEC="UA;&EA<VEN9R<*("`@​(&-C9FQA9W,@​
M/2<M9FYO+7-T<FEC="UA;&EA<VEN9R<*("`@​('-T9&-H87(])V-H87(G+"!D
M7W-T9'-T9&EO/61E9FEN92P@​=7-E=F9O<FL]9F%L<V4*("`@​(&EN='-I>F4]
M-"P@​;&]N9W-I>F4]-"P@​<'1R<VEZ93TT+"!D;W5B;&5S​:7IE/3@​*("`@​(&1?
M;&]N9VQO;F<]9&5F​:6YE+"!L;VYG;&]N9W-I>F4]."P@​9%]L;VYG9&)L/61E
M9FEN92P@​;&]N9V1B;'-I>F4],3(*("`@​(&EV='EP93TG;&]N9R<L(&EV<VEZ
M93TT+"!N=G1Y<&4])V1O=6)L92<L(&YV<VEZ93TX+"!/9F9?=#TG;V9F7W0G
M+"!L<V5E​:W-I>F4]-`H@​("`@​86QI9VYB>71E<STT+"!U<V5M>6UA;&QO8SUN
M+"!P<F]T;W1Y<&4]9&5F​:6YE"B`@​3&EN​:V5R(&%N9"!,​:6)R87)I97,Z"B`@​
M("!L9#TG9V-C)RP@​;&1F;&%G<R`])R`M3"]U<W(O;&]C86PO;&EB)PH@​("`@​
M;&EB<'1H/2]U<W(O;&]C86PO;&EB("]L​:6(@​+W5S<B]L​:6(*("`@​(&QI8G,]
M+6QN<VP@​+6QD;"`M;&T@​+6QC("UL8W)Y<'0*("`@​(&QI8F,]+VQI8B]L​:6)C
M+3(N,2XY,BYS;RP@​<V\]<V\L('5S97-H<G!L​:6(]9F%L<V4L(&QI8G!E<FP]
M;&EB<&5R;"YA"B`@​1'EN86UI8R!,​:6YK​:6YG.@​H@​("`@​9&QS<F,]9&Q?9&QO
M<&5N+GAS+"!D;&5X=#US;RP@​9%]D;'-Y;75N/75N9&5F+"!C8V1L9FQA9W,]
M)RUR9'EN86UI8R<*("`@​(&-C8V1L9FQA9W,])RUF4$E#)RP@​;&1D;&9L86=S
M/2<M<VAA<F5D("U,+W5S<B]L;V-A;"]L​:6(G"@​IP97)L("U-0V]N9FEG("UE
M("=D​:64@​(B5%<G)O<CH@​5&AI<R!W;W)K<R([)PHE17)R;W(Z(%1H​:7,@​=V]R
M​:W,@​870@​+64@​;&EN92`Q+@​IM86ME.B!;;VM=($5R<F]R(#(U-2`H​:6=N;W)E
M9"D*9V-C(&!P97)L("U-17AT571I;',Z.D5M8F5D("UE(&-C;W!T<V`@​+6,@​
M9&EE7V-A;&QS7W!R​:6YT9BYC("UO(&1I95]C86QL<U]P<FEN=&8N;PIG8V,@​
M9&EE7V-A;&QS7W!R​:6YT9BYO(&!P97)L("U-17AT571I;',Z.D5M8F5D("UE
M(&QD;W!T<V`@​"BXO82YO=70*+3$N.3DT.#4P12LP,')R;W(Z(&)A>B!A="`H
M979A;"`Q*2!L​:6YE(#$N"FUA​:V4Z("HJ*B!;<G5N72!%<G)O<B`R-34*"D-O
M;7!I;&%T​:6]N(&5X​:71E9"!A8FYO<FUA;&QY('=I=&@​@​8V]D92`R(&%T(%1U
M92!!<'(@​,3<@​,3<Z,30Z-#,*````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````9&EE7V-A;&QS7W!R​:6YT9B]-86ME9FEL90``
M````````````````````````````````````````````````````````````
M`````````````````````````````````````#`Q,#`V-C8`,#`P,3<W,0`P
M,#`P,30U`#`P,#`P,#`P-#(U`#`W,C8W,3,Q,#<W`#`Q-30R-``@​,```````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````!U<W1A<B`@​`'=S;GED97(`````````````````````````````````
M​:'=E;F<`````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````!R=6XZ(&-F9R!O
M​:R!X"@​DN+V$N;W5T"F]K.@​H)+7!E<FP@​+4U#;VYF​:6<@​+64@​)V1I92`B)45R
M<F]R.B!4​:&ES('=O<FMS(CLG"F-F9SH*"7!E<FP@​+4U#;VYF​:6<@​+64@​)W!R
M​:6YT($-O;F9I9SHZ;7EC;VYF​:6<H*3LG"F\Z"@​EG8V,@​8'!E<FP@​+4U%>'15
M=&EL<SHZ16UB960@​+64@​8V-O<'1S8"`M8R!D​:65?8V%L;'-?<')I;G1F+F,@​
M+6\@​9&EE7V-A;&QS7W!R​:6YT9BYO"G@​Z(&\*"6=C8R!D​:65?8V%L;'-?<')I
M;G1F+F\@​8'!E<FP@​+4U%>'15=&EL<SHZ16UB960@​+64@​;&1O<'1S8"`*````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
9````````````````````````````````````
`
end

Perl Info

Flags:
    category=core
    severity=high

Site configuration information for perl v5.6.0:

Configured by prospector at Mon Aug  7 10:58:30 EDT 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.2.5-22smp, archname=i386-linux
    uname='linux porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2 09:11:51 edt 1999 i686 unknown '
    config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dcc=gcc -Dcccdlflags=-fPIC -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dd_dosuid -Dd_semctl_semun -Di_db -Di_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Uuselargefiles'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=undef 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='gcc', optimize='-O2 -march=i386 -mcpu=i686', gccversion=2.96 20000731 (experimental)
    cppflags='-fno-strict-aliasing'
    ccflags ='-fno-strict-aliasing'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldl -lm -lc -lcrypt
    libc=/lib/libc-2.1.92.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    


@INC for perl v5.6.0:
    /usr/lib/perl5/5.6.0/i386-linux
    /usr/lib/perl5/5.6.0
    /usr/lib/perl5/site_perl/5.6.0/i386-linux
    /usr/lib/perl5/site_perl/5.6.0
    /usr/lib/perl5/site_perl
    .


Environment for perl v5.6.0:
    HOME=/home/wsnyder
    LANG=en_US
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/edatools/willamette_hdl/AC1.0.1_Linux/Linux/lib:/edatools/vcs-6.0Beta2/intel_i686_linux_2.2/lib:/lib:/usr/lib:/usr/local/lib:/usr/X11R6/lib:/usr/include/sp/lib:/usr/lib/sgml/stylesheets/nwalsh-modular/lib:/usr/lib/linuxconf/lib:/usr/lib/qt-1.45/lib:/usr/lib/qt-2.2.0/lib:/usr/share/doc/stylesheets-1.54.13rh/doc/lib:/usr/share/ssl/lib:/usr/kerberos/lib:/usr/i386-glibc21-linux/lib
    LOGDIR (unset)
    PATH=/home/wsnyder/bin:/edatools/willamette_hdl/AC1.0.1_Linux/Linux:/edatools/surelint-2.0.3/bin:/edatools/vera-4.5.3/bin:/edatools/vcs-6.0Beta2/bin:/edatools/vcs-6.0Beta2/intel_i686_linux_2.2/bin:/edatools/vcs-6.0Beta2/intel_i686_linux_2.2/util:/edatools/systemsim-1.3.0/bin:/usr/local/common/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/usr/lib/sgml/stylesheets/nwalsh-modular/bin:/usr/lib/qt-1.45/bin:/usr/lib/qt-2.2.0/bin:/opt/samba/bin:/usr/kerberos/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash

--f3HLR3q30133.987542823/brac.nauticusnet.com--

@p5pRT
Copy link
Author

p5pRT commented May 26, 2001

From @floatingatoll

Extracted the test case from the uuencoding; fails with the following output on @​10209.

perl -MConfig -e 'die "%Error​: This works";'
%Error​: This works at -e line 1.
make​: [ok] Error 255 (ignored)
gcc `perl -MExtUtils​::Embed -e ccopts` -c t1.c -o t1.o -g
gcc t1.o `perl -MExtUtils​::Embed -e ldopts` -g
./a.out
2.085267E+00rror​: baz at (eval 1) line 1. # <-----

R.

print <<EOF; # Makefile
run​: ok x
  -./a.out
ok​:
  -perl -MConfig -e 'die "%Error​: This works";'
o​:
  gcc `perl -MExtUtils​::Embed -e ccopts` -c t1.c -o t1.o -g
x​: o
  gcc t1.o `perl -MExtUtils​::Embed -e ldopts` -g
EOF

print <<EOF; # t1.c
#include <stdlib.h>
#include <EXTERN.h>
#include <perl.h>

static PerlInterpreter *pcli_perl;

int main(int argc, char **argv, char **env)
{
  char *args[] = { "perl", "-e", "0" };
  pcli_perl = perl_alloc();
  perl_construct(pcli_perl);
  perl_parse(pcli_perl, NULL, 3,args, (char **)NULL);
  perl_eval_pv ("die '%Error​: baz';", TRUE);
}
EOF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants