Module Name:    src
Committed By:   riastradh
Date:           Tue Jun 18 18:55:32 UTC 2024

Modified Files:
        src/doc: HACKS

Log Message:
doc/HACKS: Note tsan TLS alignment workaround for PR lib/58349.


To generate a diff of this commit:
cvs rdiff -u -r1.245 -r1.246 src/doc/HACKS

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/HACKS
diff -u src/doc/HACKS:1.245 src/doc/HACKS:1.246
--- src/doc/HACKS:1.245	Sun Jun  9 18:55:40 2024
+++ src/doc/HACKS	Tue Jun 18 18:55:32 2024
@@ -1,4 +1,4 @@
-# $NetBSD: HACKS,v 1.245 2024/06/09 18:55:40 mrg Exp $
+# $NetBSD: HACKS,v 1.246 2024/06/18 18:55:32 riastradh Exp $
 #
 # This file is intended to document workarounds for currently unsolved
 # (mostly) compiler bugs.
@@ -1150,3 +1150,17 @@ descr
 	I suspect a GCC bug.
 	The blake2 version is less well studied.
 kcah
+
+hack	gcc: work around alignment limitations in ld.elf_so
+cdate	Mon Jun 17 23:35:52 UTC 2024
+who	riastradh
+file	external/gpl3/gcc/dist/libsanitizer/tsan/tsan_interceptors_posix.cpp : 1.4
+file	src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl.cpp : 1.4
+file	external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl.h : 1.5
+descr
+	ld.elf_so only supports 2*pointer-aligned objects (typically
+	8- or 16-byte) in thread-local storage, but tsan expects
+	cacheline-aligned objects (typically >=64-byte).  To work
+	around this, allocate n + 63 bytes and pick whichever pointer
+	in that interval is aligned (PR lib/58349).
+kcah

Reply via email to