GC issue? List.pool overwritten by allocated object
Denis Feklushkin
feklushkin.denis at gmail.com
Fri May 16 10:42:36 UTC 2025
On Wednesday, 14 May 2025 at 09:11:13 UTC, Denis Feklushkin wrote:
> Okay, I think the question can be considered closed
However, I am still on this issue! :(
```
ERROR: AddressSanitizer: SEGV on unknown address 0x000100000006
```
I tried all 4 available TLS models: global-dynamic,
local-dynamic, initial-exec, local-exec. But I didn't build
druntime with these models - only resulting binary.
Valgring says that memory block, returned by malloc(), has never
been allocated dynamically:
```
$ valgrind --tool=memcheck ./pukan
[...]
==1218062== Address 0x100000006 is not stack'd, malloc'd or
(recently) free'd
```
`$fs_base` (a-la TLS pointer reported by GDB) is
0x00007ffff7a50b40. And all other allocated and used values of my
D code are lying nearby this value.
I also found that the problem with access to the 0x100000006
pointer is quite common. And, it seems, always threads-related:
https://bbs.archlinux.org/viewtopic.php?id=210363 - here I
couldn't track how they solved the problem
https://github.com/gluster/glusterfs/issues/2971 - crashed while
`ltcmalloc` library init/fini related functions are called in two
different threads during a library loaded/unloaded.The process is
getting crashed during access of tls variables in heap profiler
api
Adding fuel to the fire is the fact that the same `vulkan`
library works for me without (any known) problems [in Danny
Arends project](https://github.com/DannyArends/DImGui), which
uses SDL2 instead of glfw. Loading the `vulkan` library itself
happens by the same way in both projects - linking during the
build process.
More information about the Digitalmars-d
mailing list