perl_clone of libperl causes segfault on xenial, yakkety, zesty ok on trusty

Bug #1668450 reported by Mitch Capper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
perl (Ubuntu)
New
Undecided
Unassigned

Bug Description

For using perl in C++ programs unfortunately a simple call to perl_clone causes a segfault. The problem does not happen on trusty, but does on later Ubuntu iterations. Could be perl version (5.18 OK vs 5.22/5.24 newer that fault) but as each platform only supports one version of perl can't easily test the others.

(gdb) run
Starting program: /a.out
b[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7a6f13a in Perl_padnamelist_dup () from /usr/lib/x86_64-linux-gnu/libperl.so.5.24
(gdb) bt
#0 0x00007ffff7a6f13a in Perl_padnamelist_dup () from /usr/lib/x86_64-linux-gnu/libperl.so.5.24
#1 0x00007ffff7adca9f in perl_clone () from /usr/lib/x86_64-linux-gnu/libperl.so.5.24
#2 0x000055555555492d in main () at test.c:10
(gdb) Quit
(gdb)
#0 0x00007ffff7a6f13a in Perl_padnamelist_dup () from /usr/lib/x86_64-linux-gnu/libperl.so.5.24
#1 0x00007ffff7adca9f in perl_clone () from /usr/lib/x86_64-linux-gnu/libperl.so.5.24
#2 0x000055555555492d in main () at test.c:10

Sample system info from where broken:
Description: Ubuntu 16.04.2 LTS
Release: 16.04
      perl | 5.22.1-9 | http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
libperl-dev | 5.22.1-9 | http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages

to reproduce with docker:
docker run -t -i ubuntu:zesty bash
docker run -t -i ubuntu:yakkety bash
docker run -t -i ubuntu:xenial bash

ok with:
docker run -t -i ubuntu:trusty bash

then some packages:
apt-get update && apt-get install build-essential libperl-dev

finally the attached test.c file place and compile with:

and run with perl version:
trusty:
gcc -g test.c -I/usr/lib/perl/5.18.2/CORE/ -lperl && ./a.out
xenial/yakkety (yakkety might be 5.22.2):
gcc -g test.c -I/usr/lib/x86_64-linux-gnu/perl/5.22.1/CORE/ -lperl && ./a.out
zesty:
gcc -g test.c -I/usr/lib/x86_64-linux-gnu/perl/5.24.1/CORE/ -lperl && ./a.out

Others cause seg fault, trusty is fine.

Revision history for this message
Mitch Capper (mitchcapper) wrote :
Revision history for this message
Mitch Capper (mitchcapper) wrote :

I can't close this, but it turns out this also happens on newer versions of debian like stretch (with perl 5.24). I had tried stable but that only has 5.20, so it seems this may be new in the 5.22ish area.

Revision history for this message
Mitch Capper (mitchcapper) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.