Bug 14776 – shared library test - loadDR - segfaults on FreeBSD 10 when not building with -release
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
FreeBSD
Creation time
2015-07-06T10:06:00Z
Last change time
2015-10-04T18:19:05Z
Assigned to
nobody
Creator
issues.dlang
Comments
Comment #0 by issues.dlang — 2015-07-06T10:06:28Z
As discussed in issue# 14773, the druntime unit tests unfortunately are only built and run with -release. However, if you build them without -release and run them on FreeBSD 10, then you get this failure:
Testing link
Testing load
Testing linkD
Testing linkDR
Testing loadDR
Makefile:28: recipe for target 'obj/freebsd/64/loadDR.done' failed
gmake[1]: *** [obj/freebsd/64/loadDR.done] Segmentation fault
gmake[1]: Leaving directory '/usr/home/jmdavis/Programming/github/druntime/test/shared'
posix.mak:206: recipe for target 'test/shared/.run' failed
gmake: *** [test/shared/.run] Error 2
I don't know for sure that this is FreeBSD-10 specific, since I haven't run the druntime unit tests without -release on anything else, but I expect that it's related to issue# 14663, which definitely is specific to newer versions of FreeBSD, which is why I'm marking this as FreeBSD-only. I suppose that I could just put it under issue# 14663 (and perhaps I should), but I don't know that they're the same bug, so I figured that I'd list this one separately just in case.
Comment #1 by github-bugzilla — 2015-08-17T06:20:43Z
Commit pushed to master at https://github.com/D-Programming-Language/druntimehttps://github.com/D-Programming-Language/druntime/commit/5f6c43131527749f6a3675ba4408bdfb90f2052b
fix check for copy relocations when dynamically loading druntime
- fixes Issue 14776 - shared library test - loadDR - segfaults on FreeBSD 10
- the executable might not define _end or __bss_start
in which case they'll resolve to within the shared
druntime library
- skip copy relocation check when we can't determine the
copy reloc section b/c druntime was dynamically loaded
- copy relocations can't occur when dynamically loading a
library anyhow
- checkModuleCollisions only needed for version (Shared) druntime build
Comment #2 by github-bugzilla — 2015-10-04T18:19:05Z