Subject: | core dumps on Arm Linux |
$ perl -MSys::LoadAvg -e 'Sys::LoadAvg::loadavg()'
Segmentation fault
$
This is true with any version of Perl.
strace | tail gives
lseek(4, 5720, SEEK_SET) = 5720
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1080) = 1080
lseek(4, 2917, SEEK_SET) = 2917
read(4, "A2\0\0\0aeabi\0\1(\0\0\0\0057-A\0\6\n\7A\10\1\t\2\n\4\22"..., 51) = 51
fstat64(4, {st_mode=S_IFREG|0555, st_size=6800, ...}) = 0
mmap2(NULL, 68428, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0xb6b49000
mprotect(0xb6b4a000, 61440, PROT_NONE) = 0
mmap2(0xb6b59000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0) = 0xb6b59000
close(4) = 0
close(3) = 0
open("/proc/loadavg", O_RDONLY) = 3
read(3, "1.19 1.21 1.41 3/217 17037\n", 64) = 27
close(3) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x28f5c2ab} ---
+++ killed by SIGSEGV +++
Segmentation fault
4.4.38-std-2 #1 SMP Tue Jan 10 14:50:25 UTC 2017 armv7l GNU/Linux
gcc version 4.9.2