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

[perl #123764] Perl_sv_vcatpvfn_flags: Assertion `(IV)elen >= 0' failed (sv.c:11434)

Thread Previous
Brian Carpenter
February 8, 2015 21:00
[perl #123764] Perl_sv_vcatpvfn_flags: Assertion `(IV)elen >= 0' failed (sv.c:11434)
Message ID:
# New Ticket Created by  Brian Carpenter 
# Please include the string:  [perl #123764]
# 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
gdb-peda$ r
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
perl: sv.c:11434: Perl_sv_vcatpvfn_flags: Assertion `(IV)elen >= 0' failed.

Program received signal SIGABRT, Aborted.
RAX: 0x0 
RBX: 0x7fffffffe63a --> 0x736574006c726570 ('perl')
RCX: 0xffffffffffffffff 
RDX: 0x6 
RSI: 0x9c7c 
RDI: 0x9c7c 
RBP: 0x7ffff6ea9a07 --> 0x257325732500203a (': ')
RSP: 0x7fffffffcde8 --> 0x7ffff6d923e0 (<*__GI_abort+384>:	mov    rdx,QWORD PTR fs:0x10)
RIP: 0x7ffff6d8f165 (<*__GI_raise+53>:	cmp    rax,0xfffffffffffff000)
R8 : 0x7ffff7fdd700 (0x00007ffff7fdd700)
R9 : 0x56492860206e6f69 ('ion `(IV')
R10: 0x8 
R11: 0x202 
R12: 0xf73ad8 ("(IV)elen >= 0")
R13: 0xf899e0 ("Perl_sv_vcatpvfn_flags")
R14: 0x7ffff6ea9a07 --> 0x257325732500203a (': ')
R15: 0x2caa
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| 0x7fffffffcde8 --> 0x7ffff6d923e0 (<*__GI_abort+384>:	mov    rdx,QWORD PTR fs:0x10)
0008| 0x7fffffffcdf0 --> 0xf73ad8 ("(IV)elen >= 0")
0016| 0x7fffffffcdf8 --> 0x7ffff6eab9c1 --> 0x706c6568007325 ('%s')
0024| 0x7fffffffce00 --> 0x7fffffffce20 --> 0x3000000018 
0032| 0x7fffffffce08 --> 0x2caa 
0040| 0x7fffffffce10 --> 0x7fffffffcf10 --> 0x7fffffffe63a --> 0x736574006c726570 ('perl')
0048| 0x7fffffffce18 --> 0x7ffff6dc3fe6 (<__fxprintf+310>:	lea    rsp,[rbp-0x20])
0056| 0x7fffffffce20 --> 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 hexdump:
0000000 7271 2880 3f3f 0080                    

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