[Issue 6319] Problem with prinft inside debug{} of pure function
http://d.puremagic.com/issues/show_bug.cgi?id=6319 --- Comment #3 from changlon 2011-07-14 18:11:45 PDT --- (In reply to comment #2) > Starting program: /web/www/tmp/jade/jade2test > [Thread debugging using libthread_db enabled] > f = 0x4fc4b0,32, t = 0x713030,32, size = 1 > f = 0x4fed20,176, t = 0x77ed5f00,176, size = 1 > f = 0x4ff200,72, t = 0x71f490,72, size = 1 > f = 0x4f8c10,64, t = 0x77ed8fc0,64, size = 1 > f = 0x4f8d00,64, t = 0x77ed8f80,64, size = 1 > f = 0x4f0880,12, t = 0x77ed9ff0,12, size = 1 > f = 0x4f3920,56, t = 0x77ed8f00,56, size = 1 > f = 0x4f3920,56, t = 0x77ed8ec0,56, size = 1 > 1 times use time = 1ms > > > > Program received signal SIGSEGV, Segmentation fault. > 0x004cda08 in rt.lifetime.rt_finalize (p=0x7729d000, det=false) > at src/rt/lifetime.d:1154 > 1154ClassInfo c = **pc; > (gdb) bt > #0 0x004cda08 in rt.lifetime.rt_finalize (p=0x7729d000, > det=false) > at src/rt/lifetime.d:1154 > #1 0x004cb1de in gc.gcx.Gcx.fullcollect (this=0x713060, > stackTop=0x7fffe260) at src/gc/gcx.d:2631 > #2 0x004caaf3 in gc.gcx.Gcx.fullcollectshell (this=0x713060) > at src/gc/gcx.d:2391 > #3 0x004c902b in gc.gcx.GC.fullCollectNoStack (this=0x713030) > at src/gc/gcx.d:1329 > #4 0x004c721d in gc.gc.gc_term () at src/gc/gc.d:133 > #5 0x004abc4d in rt.dmain2.main.runAll (this=0x7fffe4a0) > at src/rt/dmain2.d:515 > #6 0x004ab6f5 in rt.dmain2.main.tryExec (this=0x7fffe4a0, > dg=0x004abbdc7fffe4a0) at src/rt/dmain2.d:471 > #7 0x004ab684 in rt.dmain2.main (argc=1, argv=0x7fffe588) > at src/rt/dmain2.d:518 sorry for my mistake, this is for bug 6014 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6319] Problem with prinft inside debug{} of pure function
http://d.puremagic.com/issues/show_bug.cgi?id=6319 changlon changed: What|Removed |Added CC||chang...@gmail.com --- Comment #2 from changlon 2011-07-14 18:10:31 PDT --- Starting program: /web/www/tmp/jade/jade2test [Thread debugging using libthread_db enabled] f = 0x4fc4b0,32, t = 0x713030,32, size = 1 f = 0x4fed20,176, t = 0x77ed5f00,176, size = 1 f = 0x4ff200,72, t = 0x71f490,72, size = 1 f = 0x4f8c10,64, t = 0x77ed8fc0,64, size = 1 f = 0x4f8d00,64, t = 0x77ed8f80,64, size = 1 f = 0x4f0880,12, t = 0x77ed9ff0,12, size = 1 f = 0x4f3920,56, t = 0x77ed8f00,56, size = 1 f = 0x4f3920,56, t = 0x77ed8ec0,56, size = 1 1 times use time = 1ms Program received signal SIGSEGV, Segmentation fault. 0x004cda08 in rt.lifetime.rt_finalize (p=0x7729d000, det=false) at src/rt/lifetime.d:1154 1154ClassInfo c = **pc; (gdb) bt #0 0x004cda08 in rt.lifetime.rt_finalize (p=0x7729d000, det=false) at src/rt/lifetime.d:1154 #1 0x004cb1de in gc.gcx.Gcx.fullcollect (this=0x713060, stackTop=0x7fffe260) at src/gc/gcx.d:2631 #2 0x004caaf3 in gc.gcx.Gcx.fullcollectshell (this=0x713060) at src/gc/gcx.d:2391 #3 0x004c902b in gc.gcx.GC.fullCollectNoStack (this=0x713030) at src/gc/gcx.d:1329 #4 0x004c721d in gc.gc.gc_term () at src/gc/gc.d:133 #5 0x004abc4d in rt.dmain2.main.runAll (this=0x7fffe4a0) at src/rt/dmain2.d:515 #6 0x004ab6f5 in rt.dmain2.main.tryExec (this=0x7fffe4a0, dg=0x004abbdc7fffe4a0) at src/rt/dmain2.d:471 #7 0x004ab684 in rt.dmain2.main (argc=1, argv=0x7fffe588) at src/rt/dmain2.d:518 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 6319] Problem with prinft inside debug{} of pure function
http://d.puremagic.com/issues/show_bug.cgi?id=6319 --- Comment #1 from bearophile_h...@eml.cc 2011-07-14 17:52:52 PDT --- Until this bug gets fixed, a simple workaround is to just put the if() outside the debug{}: import core.stdc.stdio; void foo() pure { if(true) debug { printf(""); } } void main() { foo(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---