[Bug 14761] New: commands using SET_PTR_TO_GLOBALS segfaults when compiled with clang 12.0.1
bugzilla at busybox.net
bugzilla at busybox.net
Sun Apr 17 18:06:46 UTC 2022
https://bugs.busybox.net/show_bug.cgi?id=14761
Bug ID: 14761
Summary: commands using SET_PTR_TO_GLOBALS segfaults when
compiled with clang 12.0.1
Product: Busybox
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: logoerthiner1 at 163.com
CC: busybox-cvs at busybox.net
Target Milestone: ---
Created attachment 9286
--> https://bugs.busybox.net/attachment.cgi?id=9286&action=edit
.config file for reference; mostly defconfig with only tweaks in general config
I compiled busybox using clang (12.0.1, default version on alpine 3.15 amd64,
make CC=clang STRIP=llvm-strip) on aarch64 architecture, and then run it on
aarch64 linux kernel. Some of commands segfaults directly:
```
~ $ busybox getty
Segmentation fault
~ $ busybox vi
Segmentation fault
~ $ busybox awk
Segmentation fault
~ $ busybox ed
Segmentation fault
~ $ busybox diff
Segmentation fault
~ $ busybox netstat
Segmentation fault
~ $ busybox wget
Segmentation fault
~ $ busybox ftpd
Segmentation fault
~ $ busybox httpd
Segmentation fault
~ $ busybox ntpd
~ $ busybox arping
Segmentation fault
```
I suspect SET_PTR_TO_GLOBALS is the culprit, since many commands using
SET_PTR_TO_GLOBALS does not work at all.
clang 12.0.1 may not respect "unconst" black magic in busybox.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list