Summary: | sysutils/screen -4.7.0_4: stack overflow detected on arm | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Ulrich Grey <usenet> |
Component: | Individual Port(s) | Assignee: | Cy Schubert <cy> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | mikael, saper |
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(cy) |
Version: | Latest | ||
Hardware: | arm | ||
OS: | Any |
Description
Ulrich Grey
2019-11-03 16:06:56 UTC
Is ASLR enabled? ulimit -a, please. The core won't do me any good, no arm here, no debug info. A backtrace won't do us good as screen traps all exceptions and issues an abort() to abend gracefully. ulimit -a for my wandboard-quad running: root@wqtest:~ # uname -a FreeBSD wqtest.intranet 13.0-CURRENT FreeBSD 13.0-CURRENT r352778 GENERIC arm root@wqtest:~ # ulimit -a cpu time (seconds, -t) unlimited file size (512-blocks, -f) unlimited data seg size (kbytes, -d) 524288 stack size (kbytes, -s) 8192 core file size (512-blocks, -c) unlimited max memory size (kbytes, -m) unlimited locked memory (kbytes, -l) unlimited max user processes (-u) 5547 open files (-n) 58095 virtual mem size (kbytes, -v) unlimited swap limit (kbytes, -w) unlimited socket buffer size (bytes, -b) unlimited pseudo-terminals (-p) unlimited kqueues (-k) unlimited umtx shared locks (-o) unlimited I didn't ask for uname -a. Is ASLR enabled? sysctl -a | grep aslr root@wqtest:~ # sysctl -a | grep aslr kern.elf32.aslr.stack_gap: 3 kern.elf32.aslr.honor_sbrk: 1 kern.elf32.aslr.pie_enable: 0 kern.elf32.aslr.enable: 0 vm.aslr_restarts: 0 I don't know what the issue is but here is a possible workaround for arm: Index: Makefile =================================================================== --- Makefile (revision 516618) +++ Makefile (working copy) @@ -49,6 +49,10 @@ .include <bsd.port.options.mk> +.if ${ARCH} == armv6 || ${ARCH} == armv7 +SSP_CFLAGS?= -fno-stack-protector +.endif + GNU_CONFIGURE= yes CFLAGS+= -I${NCURSESINC} LDFLAGS+= -L${NCURSESLIB} I don't have any arm here. Can you test the patch please? The patch does not work. I get a "stack overflow detected" warning like before. (In reply to Ulrich Grey from comment #8) Can you post the build log somewhere (it works for me on 2 different boards)? I noticed that I made a stupid mistake. I installed the new built package from an older repository. Mikaëls patch works, sysutils/screen is running now on my wandboard. I apologize. Thanks all for the patch and for testing this. A commit references this bug: Author: cy Date: Mon Nov 4 20:43:08 UTC 2019 New revision: 516740 URL: https://svnweb.freebsd.org/changeset/ports/516740 Log: Fix a stack assertion under arm. PR: 241690 Submitted by: mikael.urankar at gmail.com Reported by: Ulrich Grey <usenet at ulrich-grey.de> Changes: head/sysutils/screen/Makefile Is this a proper fix or maybe is there a bug in screen somewhere anyway? Would that be possible to compile screen without this patch make WITH_DEBUG=yes clean deinstall reinstall and see where it crashes with gdb ("bt all" after crash) (In reply to Marcin Cieślak from comment #13) er, just 'bt' This is the correct fix. |