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

[perl #123765] S_sublex_done: Assertion `(PL_parser->lex_inwhat) == OP_SUBST || (PL_parser->lex_inwhat) == OP_TRANS' failed (op.c:2445)

Brian Carpenter
February 8, 2015 21:05
[perl #123765] S_sublex_done: Assertion `(PL_parser->lex_inwhat) == OP_SUBST || (PL_parser->lex_inwhat) == OP_TRANS' failed (op.c:2445)
Message ID:
# New Ticket Created by  Brian Carpenter 
# Please include the string:  [perl #123765]
# in the subject line of all future correspondence about this issue. 
# <URL: >

Built v5.21.9 (v5.21.8-237-g3c47da3) with 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
gdb-peda$ r
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
perl: toke.c:2445: S_sublex_done: Assertion `(PL_parser->lex_inwhat) == OP_SUBST || (PL_parser->lex_inwhat) == OP_TRANS' failed.

Program received signal SIGABRT, Aborted.
RAX: 0x0 
RBX: 0x7fffffffe639 --> 0x736574006c726570 ('perl')
RCX: 0xffffffffffffffff 
RDX: 0x6 
RSI: 0x9d6a 
RDI: 0x9d6a 
RBP: 0x7ffff6ea9a07 --> 0x257325732500203a (': ')
RSP: 0x7fffffffd838 --> 0x7ffff6d923e0 (<*__GI_abort+384>:	mov    rdx,QWORD PTR fs:0x10)
RIP: 0x7ffff6d8f165 (<*__GI_raise+53>:	cmp    rax,0xfffffffffffff000)
R8 : 0x7ffff7fdd700 (0x00007ffff7fdd700)
R9 : 0x27534e4152545f50 ("P_TRANS'")
R10: 0x8 
R11: 0x206 
R12: 0xf3a7a8 ("(PL_parser->lex_inwhat) == OP_SUBST || (PL_parser->lex_inwhat) == OP_TRANS")
R13: 0xf3c158 ("S_sublex_done")
R14: 0x7ffff6ea9a07 --> 0x257325732500203a (': ')
R15: 0x98d
EFLAGS: 0x206 (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| 0x7fffffffd838 --> 0x7ffff6d923e0 (<*__GI_abort+384>:	mov    rdx,QWORD PTR fs:0x10)
0008| 0x7fffffffd840 --> 0xf3a7a8 ("(PL_parser->lex_inwhat) == OP_SUBST || (PL_parser->lex_inwhat) == OP_TRANS")
0016| 0x7fffffffd848 --> 0x7ffff6eab9c1 --> 0x706c6568007325 ('%s')
0024| 0x7fffffffd850 --> 0x7fffffffd870 --> 0x3000000018 
0032| 0x7fffffffd858 --> 0x98d 
0040| 0x7fffffffd860 --> 0x7fffffffd960 --> 0x7fffffffe639 --> 0x736574006c726570 ('perl')
0048| 0x7fffffffd868 --> 0x7ffff6dc3fe6 (<__fxprintf+310>:	lea    rsp,[rbp-0x20])
0056| 0x7fffffffd870 --> 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.

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