openwrt / openwrt/packages

perl: SIGSEGV on start if LC_ALL is unset

Open
#24,512 54 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Maintainer: Esaaprilia Salsabila
Environment: ARMv7 Processor rev 4 (v7l), custom OpenWRT fw

Description:

  • perl always crashes on startup after upgrade

GDB output:

Reading symbols from ./build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/perl/perl-5.40.0/perl...
0xb6fe69c8 in _dlstart () from /home/egorenar/Repositories/openwrt-rel/scripts/../staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-alpine/lib/ld-musl-armhf.so.1
=> 0xb6fe69c8 <_dlstart+0>:     e3a0b000        mov     r11, #0
(gdb) r
Starting program: /home/egorenar/Repositories/openwrt-rel/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/perl/perl-5.40.0/perl

Program received signal SIGSEGV, Segmentation fault.
0xb6fd8d18 in strlen (s=<optimized out>) at src/string/strlen.c:17
17              for (w = (const void *)s; !HASZERO(*w); w++);
   0xb6fd8d0c <strlen+52>:      e308e080        movw    lr, #32896      @ 0x8080
   0xb6fd8d10 <strlen+56>:      e34f4efe        movt    r4, #65278      @ 0xfefe
   0xb6fd8d14 <strlen+60>:      e348e080        movt    lr, #32896      @ 0x8080
=> 0xb6fd8d18 <strlen+64>:      e593c000        ldr     r12, [r3]
   0xb6fd8d1c <strlen+68>:      e1a02003        mov     r2, r3
   0xb6fd8d20 <strlen+72>:      e2833004        add     r3, r3, #4
   0xb6fd8d24 <strlen+76>:      e08c1004        add     r1, r12, r4
   0xb6fd8d28 <strlen+80>:      e1c1100c        bic     r1, r1, r12
   0xb6fd8d2c <strlen+84>:      e111000e        tst     r1, lr
   0xb6fd8d30 <strlen+88>:      0afffff8        beq     0xb6fd8d18 <strlen+64>
   0xb6fd8d34 <strlen+92>:      e1a03002        mov     r3, r2
(gdb) bt
#0  0xb6fd8d18 in strlen (s=<optimized out>) at src/string/strlen.c:17
#1  0xb6e3265c in Perl_sv_vcatpvfn_flags ()
   from /home/egorenar/Repositories/openwrt-rel/scripts/../staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-alpine/usr/lib/perl5/5.40/CORE/libperl.so
#2  0xb6e3265c in Perl_sv_vcatpvfn_flags ()
   from /home/egorenar/Repositories/openwrt-rel/scripts/../staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-alpine/usr/lib/perl5/5.40/CORE/libperl.so
#3  0xb6e3265c in Perl_sv_vcatpvfn_flags ()
   from /home/egorenar/Repositories/openwrt-rel/scripts/../staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-alpine/usr/lib/perl5/5.40/CORE/libperl.so
#4  0xb6e3265c in Perl_sv_vcatpvfn_flags ()
   from /home/egorenar/Repositories/openwrt-rel/scripts/../staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-alpine/usr/lib/perl5/5.40/CORE/libperl.so
#5  0xb6e3265c in Perl_sv_vcatpvfn_flags ()
   from /home/egorenar/Repositories/openwrt-rel/scripts/../staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-alpine/usr/lib/perl5/5.40/CORE/libperl.so
#6  0xb6e3265c in Perl_sv_vcatpvfn_flags ()
   from /home/egorenar/Repositories/openwrt-rel/scripts/../staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-alpine/usr/lib/perl5/5.40/CORE/libperl.so
#7  0xb6e3265c in Perl_sv_vcatpvfn_flags ()
   from /home/egorenar/Repositories/openwrt-rel/scripts/../staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-alpine/usr/lib/perl5/5.40/CORE/libperl.so
#8  0xb6e3265c in Perl_sv_vcatpvfn_flags ()
   from /home/egorenar/Repositories/openwrt-rel/scripts/../staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-alpine/usr/lib/perl5/5.40/CORE/libperl.so
#9  0xb6e3265c in Perl_sv_vcatpvfn_flags ()
   from /home/egorenar/Repositories/openwrt-rel/scripts/../staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-alpine/usr/lib/perl5/5.40/CORE/libperl.so
#10 0xb6e3265c in Perl_sv_vcatpvfn_flags ()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the startup crash on the reported ARMv7 OpenWrt environment with LC_ALL unset, then inspect the provided GDB backtrace through libperl.so, Perl_sv_vcatpvfn_flags, and musl's src/string/strlen.c. Done means Perl starts without SIGSEGV in this configuration; the report names no repository source file or test to edit.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.