New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FS#1464 - Perl built with gcc > v5 segfaults on apm821xx #6704
Comments
chunkeey: [[https://github.com/arsv/perl-cross/issues/60|perl-cross issue #60]] suggests that the gcc version detection code broke. arsv mentioned a fix and it seems that manually forcing "-fwrapv -fno-strict-aliasing" did the trick here. (See attached patch.) I had to completely purge the old perl installation too. the --force-reinstall did not on local packages. |
russell: That fixes it for me. |
diizzyy: Still an issue, perhaps ping Philip on Github (where this should have been reported on in the first place as it's in the package repo)? |
russell: diizzyy, it was reported here intentionally, because it was/is not clear if this is a general build system problem for apm821xx, or a problem that is specific to the perl package. |
pprindeville: Russell, if other things required this flag they'd be failing too. Seems to be pretty specific to Perl5. |
pprindeville: Spoke to Tony Cook and it seems that much of Perl was written relying on the undefined behavior of signed overflow wrapping around (i.e. exactly what -fwrapv controls). Ideally someone would scrub this out of Perl, but until then, the workaround is to build with this flag. Fixed with PR #6623. |
russell:
I have seen this on recent builds for Meraki MR24 (apm821xx)
Currently at commit db893ec.
Noticed recently since the update to gcc version 7 as default (at commit 61eee1a).
Using GCC_USE_VERSION_5=y builds a perl that doesn't segfault. GCC_USE_VERSION_6=y also segfaults. Perl installed is 5.26.1-3
Start perl, type "use strict;" followed by a carriage return. BOOM
root@hostname:/# perl
use strict;
Attempt to free unreferenced scalar: SV[65050.255294] perl[16847]: unhandled signal 11 at 529303c4 nip b7a193b4 lr b7a19380 code 1
0x10493190 at /usr/lib/perl5/5.26/strict.pm line 38.
Segmentation fault
The text was updated successfully, but these errors were encountered: