public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/110553] New: -fsanitize=undefined needs -latomic on powerpc-unknown-linux-gnu
@ 2023-07-04 18:31 sjames at gcc dot gnu.org
2023-07-04 18:42 ` [Bug sanitizer/110553] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-07-04 18:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110553
Bug ID: 110553
Summary: -fsanitize=undefined needs -latomic on
powerpc-unknown-linux-gnu
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: sjames at gcc dot gnu.org
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org
Target Milestone: ---
```
#include <stdio.h>
int main (void) {
printf("hi\r\n");
}
```
```
$ gcc /tmp/foo.c -o /tmp/foo -fsanitize=undefined
/usr/lib/gcc/powerpc-unknown-linux-gnu/13/../../../../powerpc-unknown-linux-gnu/bin/ld:
/usr/lib/gcc/powerpc-unknown-linux-gnu/13/libubsan.so: undefined reference to
`__atomic_compare_exchange_8'
/usr/lib/gcc/powerpc-unknown-linux-gnu/13/../../../../powerpc-unknown-linux-gnu/bin/ld:
/usr/lib/gcc/powerpc-unknown-linux-gnu/13/libubsan.so: undefined reference to
`__atomic_load_8'
collect2: error: ld returned 1 exit status
```
```
$ gcc /tmp/foo.c -o /tmp/foo -fsanitize=undefined -latomic # works
```
```
$ nm -D /usr/lib/gcc/powerpc-unknown-linux-gnu/13/libubsan.so | grep -i atomic
U __atomic_compare_exchange_8
U __atomic_load_8
```
While in this instance I can inject -latomic, it's a pain to try do that for
various configure tests.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug sanitizer/110553] -fsanitize=undefined needs -latomic on powerpc-unknown-linux-gnu
2023-07-04 18:31 [Bug sanitizer/110553] New: -fsanitize=undefined needs -latomic on powerpc-unknown-linux-gnu sjames at gcc dot gnu.org
@ 2023-07-04 18:42 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-04 18:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110553
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I wonder what function uses 64bit values for atomics in ubsan. I only saw 32bit
values (well I saw pointers and size_t in backtrace and 32bit in ubsan).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-04 18:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 18:31 [Bug sanitizer/110553] New: -fsanitize=undefined needs -latomic on powerpc-unknown-linux-gnu sjames at gcc dot gnu.org
2023-07-04 18:42 ` [Bug sanitizer/110553] " pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).