← Back to index
|
Original Bugzilla link
Bug 12792 – runtime loading D shared library as a standalone (with it's own GC etc)
Status
NEW
Severity
enhancement
Priority
P4
Component
druntime
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2014-05-23T21:14:54Z
Last change time
2024-12-07T13:33:52Z
Keywords
dll
Assigned to
No Owner
Creator
Martin Nowak
Moved to GitHub: dmd#17277 →
Comments
Comment #0
by code — 2014-05-23T21:14:54Z
Reported by Timothee Cour on the newsgroup.
http://forum.dlang.org/post/
[email protected]
main.d: call a D shared library via dlopen/dlsym foo.d: extern(C) void foo(){ printf("inside_foo\n"); //ok import core.runtime; bool ret=Runtime.initialize();//will segfault below with or without that assert(ret);//ok int[]a; a.length=2;//segfault } dmd -g -oflibfoo.dylib -shared foo.d dmd -g -oftest main.d ./test #Loading shared libraries isn't yet supported on OSX. #inside_foo #segfault at first occurence of gc (a.length=2 above) under lldb: * thread #1: test D2rt12sections_osx9tlsOffsetFPvZm + 109, stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT) frame #0: test D2rt12sections_osx9tlsOffsetFPvZm + 109 frame #1: test __tls_get_addr + 20 frame #2: libfoo.dylib _d_arraysetlengthT + 3701
Comment #1
by robert.schadek — 2024-12-07T13:33:52Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/dmd/issues/17277
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB