Skip Menu |

This queue is for tickets about the PDL-Graphics-PLplot CPAN distribution.

Report information
The Basics
Id: 122034
Status: open
Priority: 0/
Queue: PDL-Graphics-PLplot

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.71
Fixed in: (no value)



Subject: t/x09.pl crashed with Perl 5.26
After fixing CPAN RT#121884 and CPAN RT#121886, I experience this crash with Perl 5.26.0 and plplot-5.11.1 on x86_64: $ gdb --args perl -Mblib ./t/x09.pl -dev svg -o x09p.svg -fam [...] Program received signal SIGSEGV, Segmentation fault. pltr1 (x=x@entry=0, y=y@entry=1, tx=tx@entry=0x7fffffffdce0, ty=ty@entry=0x7fffffffdd00, pltr_data=pltr_data@entry=0x56736260) at /usr/src/debug/plplot-5.11.1-15.fc27.x86_64/src/plcont.c:893 893 PLFLT *xg = grid->xg; (gdb) bt #0 pltr1 (x=x@entry=0, y=y@entry=1, tx=tx@entry=0x7fffffffdce0, ty=ty@entry=0x7fffffffdd00, pltr_data=pltr_data@entry=0x56736260) at /usr/src/debug/plplot-5.11.1-15.fc27.x86_64/src/plcont.c:893 #1 0x00007fdad5817242 in pldrawcn (f2eval=f2eval@entry=0x7fdad5817050 <plf2eval1>, f2eval_data=f2eval_data@entry=0x555556746d60, nx=nx@entry=35, ny=ny@entry=46, kx=kx@entry=0, lx=lx@entry=34, ky=0, ly=45, flev=flev@entry=-1, flabel=0x7fffffffdf20 "-1.00", kcol=0, krow=0, lastx=lastx@entry=0, lasty=lasty@entry=0, startedge=-2, ipts=0x555556751be0, distance=0x7fffffffdee8, lastindex=0x7fffffffdee4, pltr=0x7fdad58189e0 <pltr1>, pltr_data=0x56736260) at /usr/src/debug/plplot-5.11.1-15.fc27.x86_64/src/plcont.c:683 #2 0x00007fdad5818615 in plcntr (pltr_data=0x56736260, pltr=0x7fdad58189e0 <pltr1>, ipts=0x555556751be0, flev=-1, ly=45, ky=0, lx=<optimized out>, kx=0, ny=46, nx=35, f2eval_data=0x555556746d60, f2eval=0x7fdad5817050 <plf2eval1>) at /usr/src/debug/plplot-5.11.1-15.fc27.x86_64/src/plcont.c:648 #3 plfcont (f2eval=0x7fdad5817050 <plf2eval1>, f2eval_data=0x555556746d60, nx=35, ny=46, kx=1, lx=<optimized out>, ky=1, ly=46, clevel=0x555556731c10, nlevel=11, pltr=0x7fdad58189e0 <pltr1>, pltr_data=0x56736260) at /usr/src/debug/plplot-5.11.1-15.fc27.x86_64/src/plcont.c:583 #4 0x00007fdad5818966 in c_plcont (f=<optimized out>, nx=<optimized out>, ny=<optimized out>, kx=<optimized out>, lx=<optimized out>, ky=<optimized out>, ly=46, clevel=0x555556731c10, nlevel=11, pltr=0x7fdad58189e0 <pltr1>, pltr_data=0x56736260) at /usr/src/debug/plplot-5.11.1-15.fc27.x86_64/src/plcont.c:525 #5 0x00007fdad5abb7b3 in pdl_plcont_readdata (__tr=0x5555567475b0) at PLplot.xs:29640 #6 0x00007fdad7ccebc5 in pdl.ensure_trans () from /usr/lib64/perl5/vendor_perl/auto/PDL/Core/Core.so #7 0x00007fdad7ccf8bf in pdl_make_trans_mutual () from /usr/lib64/perl5/vendor_perl/auto/PDL/Core/Core.so #8 0x00007fdad5ad8178 in XS_PDL_plcont (my_perl=<optimized out>, cv=<optimized out>) at PLplot.xs:56566 #9 0x00007fdada1db5c1 in Perl_pp_entersub () from /lib64/libperl.so.5.26 #10 0x00007fdada1d3366 in Perl_runops_standard () from /lib64/libperl.so.5.26 #11 0x00007fdada155e97 in perl_run () from /lib64/libperl.so.5.26 #12 0x0000555555554d2a in main ()
From: Orion Poplawski
Looks like the problem is at plplot.pd:4275: if (pltrcb != pltr_callback) pltrdt = (PLPointer) SvIV ($COMP(pltr_data)); else pltrdt = $COMP(pltr_data); So in the case that pltrcb != plrt_callback (which it doesn't in this case - it equals pltr1 which is a standard callback for plshades()), pltrdt gets assigned an integer value which truncates the pointer. Really not sure what case it's trying to handle here. Should we be using SvPV?
Subject: Re: [rt.cpan.org #122034] t/x09.pl crashed with Perl 5.26
Date: Thu, 29 Jun 2017 08:21:12 +0200
To: "http://orion.id.fedoraproject.org/ via RT" <bug-PDL-Graphics-PLplot [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
Casting integer to pointer is bad, but in case of x86_64, both have 64 bits. Thus I don't think this is due to truncation.