develooper Front page | perl.perl5.porters | Postings from February 2015

[perl #123763] Perl_op_free: Assertion `!(o->op_private & ~PL_op_private_valid[type])' failed (op.c:721)

Thread Previous
Brian Carpenter
February 8, 2015 20:53
[perl #123763] Perl_op_free: Assertion `!(o->op_private & ~PL_op_private_valid[type])' failed (op.c:721)
Message ID:
# New Ticket Created by  Brian Carpenter 
# Please include the string:  [perl #123763]
# in the subject line of all future correspondence about this issue. 
# <URL: >

Built v5.21.9 (v5.21.8-200-ga57d3d4) using the following command line:

./Configure -des -Dusedevel -DDEBUGGING -Dcc=afl-gcc -Doptimize=-O2\ -g && AFL_HARDEN=1 make -j6 test-prep

Bug found with AFL (

GDB output:
gdb-peda$ file ~/perl/perl
gdb-peda$ set args test76
gdb-peda$ r
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
Use of my $_ is experimental at test76 line 1.
Can't modify constant item in scalar assignment at test76 line 1, at EOF
Execution of test76 aborted due to compilation errors.
perl: op.c:721: Perl_op_free: Assertion `!(o->op_private & ~PL_op_private_valid[type])' failed.

Program received signal SIGABRT, Aborted.
RAX: 0x0 
RBX: 0x7fffffffe659 --> 0x736574006c726570 ('perl')
RCX: 0xffffffffffffffff 
RDX: 0x6 
RSI: 0x9ba4 
RDI: 0x9ba4 
RBP: 0x7ffff6ea9a07 --> 0x257325732500203a (': ')
RSP: 0x7fffffffdf18 --> 0x7ffff6d923e0 (<*__GI_abort+384>:	mov    rdx,QWORD PTR fs:0x10)
RIP: 0x7ffff6d8f165 (<*__GI_raise+53>:	cmp    rax,0xfffffffffffff000)
R8 : 0x7ffff7fdd700 (0x00007ffff7fdd700)
R9 : 0x2027295d65707974 ("type])' ")
R10: 0x8 
R11: 0x202 
R12: 0xefd0d8 ("!(o->op_private & ~PL_op_private_valid[type])")
R13: 0xf11132 ("Perl_op_free")
R14: 0x7ffff6ea9a07 --> 0x257325732500203a (': ')
R15: 0x2d1
EFLAGS: 0x202 (carry parity adjust zero sign trap INTERRUPT direction overflow)
   0x7ffff6d8f15b <*__GI_raise+43>:	movsxd rdi,eax
   0x7ffff6d8f15e <*__GI_raise+46>:	mov    eax,0xea
   0x7ffff6d8f163 <*__GI_raise+51>:	syscall 
=> 0x7ffff6d8f165 <*__GI_raise+53>:	cmp    rax,0xfffffffffffff000
   0x7ffff6d8f16b <*__GI_raise+59>:	ja     0x7ffff6d8f182 <*__GI_raise+82>
   0x7ffff6d8f16d <*__GI_raise+61>:	repz ret 
   0x7ffff6d8f16f <*__GI_raise+63>:	nop
   0x7ffff6d8f170 <*__GI_raise+64>:	test   eax,eax
0000| 0x7fffffffdf18 --> 0x7ffff6d923e0 (<*__GI_abort+384>:	mov    rdx,QWORD PTR fs:0x10)
0008| 0x7fffffffdf20 --> 0xefd0d8 ("!(o->op_private & ~PL_op_private_valid[type])")
0016| 0x7fffffffdf28 --> 0x7ffff6eab9c1 --> 0x706c6568007325 ('%s')
0024| 0x7fffffffdf30 --> 0x7fffffffdf50 --> 0x3000000018 
0032| 0x7fffffffdf38 --> 0x2d1 
0040| 0x7fffffffdf40 --> 0x7fffffffe040 --> 0x7fffffffe659 --> 0x736574006c726570 ('perl')
0048| 0x7fffffffdf48 --> 0x7ffff6dc3fe6 (<__fxprintf+310>:	lea    rsp,[rbp-0x20])
0056| 0x7fffffffdf50 --> 0x3000000018 
Legend: code, data, rodata, value
Stopped reason: SIGABRT
0x00007ffff6d8f165 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.

Test case: my($_);0=split
0000000 796d 2428 295f 303b 733d 6c70 7469     

Debian 7, kernel v3.2.63-2+deb7u2 x86_64, libc6 v2.13-38+deb7u7, GCC 4.9.2
Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About