perl_clone of libperl causes segfault on xenial, yakkety, zesty ok on trusty
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_
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7a6f13a in Perl_padnamelis
(gdb) bt
#0 0x00007ffff7a6f13a in Perl_padnamelis
#1 0x00007ffff7adca9f in perl_clone () from /usr/lib/
#2 0x000055555555492d in main () at test.c:10
(gdb) Quit
(gdb)
#0 0x00007ffff7a6f13a in Perl_padnamelis
#1 0x00007ffff7adca9f in perl_clone () from /usr/lib/
#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://
libperl-dev | 5.22.1-9 | http://
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/
xenial/yakkety (yakkety might be 5.22.2):
gcc -g test.c -I/usr/
zesty:
gcc -g test.c -I/usr/
Others cause seg fault, trusty is fine.
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.