digitalmars.D.bugs - [Issue 8218] New: shared library segmentation fault when missing un-needed import
- d-bugmail puremagic.com (61/61) Jun 11 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8218
http://d.puremagic.com/issues/show_bug.cgi?id=8218 Summary: shared library segmentation fault when missing un-needed import Product: D Version: D2 Platform: All OS/Version: Mac OS X Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: thelastmammoth gmail.com --- Comment #0 from thelastmammoth gmail.com 2012-06-11 01:36:19 PDT --- That sounds like a bug: dmd -shared -oflibfun.dylib fun #WOULD WORK with -lib instead of -shared dmd -g -L-L. main ./main #SEGFAULTS... see lldb output below //main.d: import std.stdio; pragma(lib,"fun"); void main(){ writeln(); } //fun.d: //import std.stdio; //UNCOMMENT THIS LINE TO MAKE IT WORK ... extern(C) int parse(int x){return x;} -------------------------------- output of lldb: Process 64987 stopped * thread #1: tid = 0x1f03, 0x0000000100000e3a main`D3std5stdio12__T7writelnZ7writelnFZv + 14 at stdio.d:1567, stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x0000000100000e3a main`D3std5stdio12__T7writelnZ7writelnFZv + 14 at stdio.d:1567 1564 { 1565 static if (T.length == 0) 1566 { -> 1567 enforce(fputc('\n', .stdout.p.handle) == '\n'); 1568 } 1569 else static if (T.length == 1 && 1570 isSomeString!(typeof(args[0])) && (lldb) bt * thread #1: tid = 0x1f03, 0x0000000100000e3a main`D3std5stdio12__T7writelnZ7writelnFZv + 14 at stdio.d:1567, stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x0000000100000e3a main`D3std5stdio12__T7writelnZ7writelnFZv + 14 at stdio.d:1567 frame #1: 0x0000000100000e25 main`_Dmain + 9 at main.d:5 frame #2: 0x0000000100011915 main`D2rt6dmain24mainUiPPaZi7runMainMFZv + 29 frame #3: 0x00000001000112ca main`D2rt6dmain24mainUiPPaZi7tryExecMFMDFZvZv + 38 frame #4: 0x0000000100011962 main`D2rt6dmain24mainUiPPaZi6runAllMFZv + 58 frame #5: 0x00000001000112ca main`D2rt6dmain24mainUiPPaZi7tryExecMFMDFZvZv + 38 frame #6: 0x0000000100011255 main`main + 237 frame #7: 0x0000000100000e14 main`start + 52 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jun 11 2012