http://d.puremagic.com/issues/show_bug.cgi?id=8133
Summary: regression(2.059): D shared lib on OSX fails in 2.059, worked in 2.058 Product: D Version: D2 Platform: All OS/Version: Mac OS X Status: NEW Severity: regression Priority: P2 Component: druntime AssignedTo: nob...@puremagic.com ReportedBy: thelastmamm...@gmail.com --- Comment #0 from thelastmamm...@gmail.com 2012-05-23 01:26:10 PDT --- The simplest possible shared lib in D (see details below) worked in 2.058 but fails in 2.059. I submitted a related (lib instead of dylib) bug report (Issue 7995) which was fixed by pull request #205 from jacob-carlborg/7995. However the code fragment below (shared lib) still fails even after applying that fix (which was pushed to master). cat main.c: extern int fun(); int main(){return fun();} cat fun.d: module fun; static import core.runtime; extern (C) export int fun() { core.runtime.Runtime.initialize(); return 0; } dmd -shared fun.d -oflibfun.dylib gcc -o main main.c -L. -lfun gdb ./main Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x0000000000000000 0x000000010000ce6c in __tls_get_addr () (gdb) where #0 0x000000010000ce6c in __tls_get_addr () #1 0x000000010000bddb in thread_attachThis () #2 0x000000010000bc6c in thread_init () #3 0x000000010000d36a in gc_init () #4 0x0000000100014035 in rt_init () #5 0x000000010000a5f7 in D4core7runtime7Runtime10initializeFDFC6object9ThrowableZvZb () #6 0x0000000100003ead in fun () #7 0x0000000100000f1f in main () -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------