[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 292146] shells/mksh: Segmentation fault on RELESE-15.0"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 03 Jan 2026 08:54:19 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292146
Bug ID: 292146
Summary: shells/mksh: Segmentation fault on RELESE-15.0
Product: Ports & Packages
Version: Latest
Hardware: amd64
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: ports-bugs@FreeBSD.org
Reporter: h4ckee@proton.me
CC: schaiba@gmail.com
CC: schaiba@gmail.com
Flags: maintainer-feedback?(schaiba@gmail.com)
Created attachment 266771
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=266771&action=edit
Build log
Hello!
I'm trying to build mksh-R59c on FreeBSD 15.0-RELEASE, but get Segmentation
faults. Could you please help me to find the issue amd mabybe fix it?
Below is when I run Build.sh manually:
root@freebsd15:/usr/src/contrib/mksh # lldb /usr/src/contrib/mksh/mksh
(lldb) target create "/usr/src/contrib/mksh/mksh"
Current executable set to '/usr/src/contrib/mksh/mksh' (x86_64).
(lldb) run
Process 23012 launched: '/usr/src/contrib/mksh/mksh' (x86_64)
Process 23012 stopped
* thread #1, name = 'mksh', stop reason = signal SIGSEGV: address not
mapped to object (fault address: 0x62)
frame #0: 0x0000000000230163 mksh`inittraps + 355
mksh`inittraps:
-> 0x230163 <+355>: cmpb $0x0, (%rax)
0x230166 <+358>: jne 0x230037 ; <+55>
0x23016c <+364>: jmp 0x230020 ; <+32>
0x230171 <+369>: movl $0x0, 0x1fefd(%rip) ; sigtraps + 40
(lldb) bt
* thread #1, name = 'mksh', stop reason = signal SIGSEGV: address not
mapped to object (fault address: 0x62)
* frame #0: 0x0000000000230163 mksh`inittraps + 355
frame #1: 0x0000000000239d57 mksh`main + 599
frame #2: 0x0000000821da037f libc.so.7`__libc_start1 + 303
frame #3: 0x0000000000212004 mksh`_start at crt1_s.S:80
(lldb)
Or sometimes I get (with disabled stack-protecrot and PIE+RELRO):
root@freebsd15:/usr/src/bin/mksh # lldb
/usr/obj/usr/src/amd64.amd64/bin/mksh/mksh.full
(lldb) target create "/usr/obj/usr/src/amd64.amd64/bin/mksh/mksh.full"
Current executable set to '/usr/obj/usr/src/amd64.amd64/bin/mksh/mksh.full'
(x86_64).
(lldb) run
Process 14406 launched: '/usr/obj/usr/src/amd64.amd64/bin/mksh/mksh.full'
(x86_64)
Process 14406 stopped
* thread #1, name = 'mksh.full', stop reason = signal SIGSEGV: address not
mapped to object (fault address: 0x1)
frame #0: 0x0000279ed1831c0b mksh.full`inittraps at histrap.c:1114:28
1111 sigtraps[i].mess = NULL;
1112 #endif
1113 if ((sigtraps[i].mess == NULL) ||
-> 1114 (sigtraps[i].mess[0] == '\0'))
1115 sigtraps[i].mess = shf_smprintf(Tf_sd,
1116 "Signal", i);
1117 }
(lldb) bt
* thread #1, name = 'mksh.full', stop reason = signal SIGSEGV: address not
mapped to object (fault address: 0x1)
* frame #0: 0x0000279ed1831c0b mksh.full`inittraps at histrap.c:1114:28
frame #1: 0x0000279ed183c28f mksh.full`main [inlined] main_init(argc=1,
argv=0x000027a6f1bbebc0, sp=<unavailable>, lp=<unavailable>) at main.c:352:2
frame #2: 0x0000279ed183c039 mksh.full`main(argc=<unavailable>,
argv=<unavailable>) at main.c:738:12
frame #3: 0x000027a6f3b6c37f libc.so.7`__libc_start1 + 303
frame #4: 0x0000279ed18127e1 mksh.full`_start at crt1_s.S:80
(lldb)
When I build from ports I still get Segfault:
root@freebsd15:/usr/ports/shells/mksh # ll work/mksh/mksh
-rwxr-xr-x 1 root wheel uarch 362472 Jan 3 08:35 work/mksh/mksh*
root@freebsd15:/usr/ports/shells/mksh # file work/mksh/mksh
work/mksh/mksh: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD),
dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 15.0
(1500068), FreeBSD-style, with debug_info, not stripped
root@freebsd15:/usr/ports/shells/mksh # work/mksh/mksh
Segmentation fault (core dumped)
Regards,
Sergey.
--
You are receiving this mail because:
You are the assignee for the bug.