-
Notifications
You must be signed in to change notification settings - Fork 555
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
SIGSEGV on start if LC_ALL is unset #22375
Comments
This is at least two different issues. The first issue is that the locale code is throwing an error (presumably because The second issue is that the code that tries to throw the error crashes. I suspect What does |
|
Huh. |
It was built as part of OpenWrt router image for my ARM router. config.h:
|
OK, I'm confused.
However, in your case this variable doesn't exist (which makes no sense) and so the macro expands to nothing (which is bad because it breaks all format strings the macro is used in). Another anomaly is that your It looks like somehow you're using (parts of?) the perl configure infrastructure from 2018 (or before) together with perl headers from 2024, so you're missing all kinds of symbols. |
If any of these format strings are empty, things can go very wrong at runtime, from garbage output to segfaults (e.g. see Perl#22375). This is a static check, so it could be placed in any source file. I chose util.c because according to the comment at the top, it is the home of "any stuff that people couldn't think of a better place for".
Thanks for looking into this. |
If any of these format strings are empty, things can go very wrong at runtime, from garbage output to segfaults (e.g. see #22375). This is a static check, so it could be placed in any source file. I chose util.c because according to the comment at the top, it is the home of "any stuff that people couldn't think of a better place for".
The current state of things: The OpenWRT perl is cross-compiled with a custom The net result is that OpenWRT's As far as I can tell, there is nothing for us to do here: Our Therefore I am going to close this ticket until something else comes up. ¹ Now that I think about it, the problem is not that these strings are empty; it's that they don't exist. So instead of tripping a static assertion, this code would be an undeclared symbol error on current OpenWRT ( |
I fixed all outdated symbols and added new ones and now got this:
Any hint what Perl expects here exactly ? From
It seems This means: |
I haven't been closely following this conversation, but this value is defined from a Configure probe. I skimmed the conversation and see mention of cross compilation. Could it be that this is a result of a mismatch between things? Platforms use two different methods to denote LC_ALL when not all locale categories have the same locale. The system you ran
In your case the separator is a semi-colon instead of a slash. It is likely that the 1..6 is correct for your box. If you changed your |
Yep, figured it out, OpenWrt's |
Update rdepends generator to account for new version specifiers (v{version} instead of just {version}) and exclude a few more external modules detected at runtime. Adjust musl configuration to set custom LC_ALL handling (musl doesn't follow glibc in that, see the last few comments here: Perl/perl5#22375 ). Adjust ptest packaging to add a dummy Makefile for 'make perl releases' test (otherwise the packaging specifically excludes makefiles). Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Update rdepends generator to account for new version specifiers (v{version} instead of just {version}) and exclude a few more external modules detected at runtime. Adjust musl configuration to set custom LC_ALL handling (musl doesn't follow glibc in that, see the last few comments here: Perl/perl5#22375 ). Adjust ptest packaging to add a dummy Makefile for 'make perl releases' test (otherwise the packaging specifically excludes makefiles). (From OE-Core rev: 1c1cfae53564c836555ace926295cf88109b8c9f) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Update rdepends generator to account for new version specifiers (v{version} instead of just {version}) and exclude a few more external modules detected at runtime. Adjust musl configuration to set custom LC_ALL handling (musl doesn't follow glibc in that, see the last few comments here: Perl/perl5#22375 ). Adjust ptest packaging to add a dummy Makefile for 'make perl releases' test (otherwise the packaging specifically excludes makefiles). Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Update rdepends generator to account for new version specifiers (v{version} instead of just {version}) and exclude a few more external modules detected at runtime. Adjust musl configuration to set custom LC_ALL handling (musl doesn't follow glibc in that, see the last few comments here: Perl/perl5#22375 ). Adjust ptest packaging to add a dummy Makefile for 'make perl releases' test (otherwise the packaging specifically excludes makefiles). Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Update rdepends generator to account for new version specifiers (v{version} instead of just {version}) and exclude a few more external modules detected at runtime. Adjust musl configuration to set custom LC_ALL handling (musl doesn't follow glibc in that, see the last few comments here: Perl/perl5#22375 ). Adjust ptest packaging to add a dummy Makefile for 'make perl releases' test (otherwise the packaging specifically excludes makefiles). (From OE-Core rev: 1c1cfae53564c836555ace926295cf88109b8c9f) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Update rdepends generator to account for new version specifiers (v{version} instead of just {version}) and exclude a few more external modules detected at runtime. Adjust musl configuration to set custom LC_ALL handling (musl doesn't follow glibc in that, see the last few comments here: Perl/perl5#22375 ). Adjust ptest packaging to add a dummy Makefile for 'make perl releases' test (otherwise the packaging specifically excludes makefiles). (From OE-Core rev: 1c1cfae53564c836555ace926295cf88109b8c9f) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Update rdepends generator to account for new version specifiers (v{version} instead of just {version}) and exclude a few more external modules detected at runtime. Adjust musl configuration to set custom LC_ALL handling (musl doesn't follow glibc in that, see the last few comments here: Perl/perl5#22375 ). Adjust ptest packaging to add a dummy Makefile for 'make perl releases' test (otherwise the packaging specifically excludes makefiles). (From OE-Core rev: 1c1cfae53564c836555ace926295cf88109b8c9f) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Update rdepends generator to account for new version specifiers (v{version} instead of just {version}) and exclude a few more external modules detected at runtime. Adjust musl configuration to set custom LC_ALL handling (musl doesn't follow glibc in that, see the last few comments here: Perl/perl5#22375 ). Adjust ptest packaging to add a dummy Makefile for 'make perl releases' test (otherwise the packaging specifically excludes makefiles). (From OE-Core rev: 1c1cfae53564c836555ace926295cf88109b8c9f) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Update rdepends generator to account for new version specifiers (v{version} instead of just {version}) and exclude a few more external modules detected at runtime. Adjust musl configuration to set custom LC_ALL handling (musl doesn't follow glibc in that, see the last few comments here: Perl/perl5#22375 ). Adjust ptest packaging to add a dummy Makefile for 'make perl releases' test (otherwise the packaging specifically excludes makefiles). (From OE-Core rev: 1c1cfae53564c836555ace926295cf88109b8c9f) Signed-off-by: Alexander Kanavin <alexlinutronix.de> Signed-off-by: Richard Purdie <richard.purdielinuxfoundation.org>
Update rdepends generator to account for new version specifiers (v{version} instead of just {version}) and exclude a few more external modules detected at runtime. Adjust musl configuration to set custom LC_ALL handling (musl doesn't follow glibc in that, see the last few comments here: Perl/perl5#22375 ). Adjust ptest packaging to add a dummy Makefile for 'make perl releases' test (otherwise the packaging specifically excludes makefiles). (From OE-Core rev: 341fcc711a8199b1dc4898a0647f5b7749c426f8) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Update rdepends generator to account for new version specifiers (v{version} instead of just {version}) and exclude a few more external modules detected at runtime. Adjust musl configuration to set custom LC_ALL handling (musl doesn't follow glibc in that, see the last few comments here: Perl/perl5#22375 ). Adjust ptest packaging to add a dummy Makefile for 'make perl releases' test (otherwise the packaging specifically excludes makefiles). (From OE-Core rev: 1c1cfae53564c836555ace926295cf88109b8c9f) Signed-off-by: Alexander Kanavin <alexlinutronix.de> Signed-off-by: Richard Purdie <richard.purdielinuxfoundation.org>
Update rdepends generator to account for new version specifiers (v{version} instead of just {version}) and exclude a few more external modules detected at runtime. Adjust musl configuration to set custom LC_ALL handling (musl doesn't follow glibc in that, see the last few comments here: Perl/perl5#22375 ). Adjust ptest packaging to add a dummy Makefile for 'make perl releases' test (otherwise the packaging specifically excludes makefiles). (From OE-Core rev: 1c1cfae53564c836555ace926295cf88109b8c9f) Signed-off-by: Alexander Kanavin <alexlinutronix.de> Signed-off-by: Richard Purdie <richard.purdielinuxfoundation.org>
Update rdepends generator to account for new version specifiers (v{version} instead of just {version}) and exclude a few more external modules detected at runtime. Adjust musl configuration to set custom LC_ALL handling (musl doesn't follow glibc in that, see the last few comments here: Perl/perl5#22375 ). Adjust ptest packaging to add a dummy Makefile for 'make perl releases' test (otherwise the packaging specifically excludes makefiles). (From OE-Core rev: 1c1cfae53564c836555ace926295cf88109b8c9f) Signed-off-by: Alexander Kanavin <alexlinutronix.de> Signed-off-by: Richard Purdie <richard.purdielinuxfoundation.org>
Description
Perl crashes on OpenWRT ARM router at start if LC_ALL is unset.
OpenWRT issue: openwrt/packages#24512
Steps to Reproduce
Just run perl.
The error seems to be triggered by code in locale.c
which calls
Perl_sv_vcatpvfn_flags
where it crashes by attempting to interpret a passed line number as a string pointer.Probably because
Perl_sv_vcatpvfn_flags
is not able to handle the specifierU32uf
??Crash backtrace with gdb on ARM:
Expected behavior
No crash.
Perl configuration
Workaround
Setting
LC_ALL=C
fixes the problem.The text was updated successfully, but these errors were encountered: