Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when calling GC.collect() #433

Closed
bioinfornatics opened this issue Jul 28, 2013 · 1 comment
Closed

Crash when calling GC.collect() #433

bioinfornatics opened this issue Jul 28, 2013 · 1 comment

Comments

@bioinfornatics
Copy link
Contributor

From rev: 9facd25
OS: gnu linux fedora
Standard lib build as shared Libray

Test code ( gcbug.d )

import core.memory;
  void main() {
    GC.collect();
  }
$ ulimit -c unlimited
$ ldc2 gcbug.d
$ ./gcbug
Segmentation fault (core dumped)
$ gdb -q ./gcbug core.9626
Reading symbols from /home/jonathan/gcbug...(no debugging symbols found)...done.
[New LWP 9626]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./gcbug'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f98a3fece6b in _d_toObject () from /lib64/libphobos-ldc.so.63
(gdb) backtrace
#0  0x00007f98a3fece6b in _d_toObject () from /lib64/libphobos-ldc.so.63
#1  0x00007f98a3fd6e5c in _d_monitorenter () from /lib64/libphobos-ldc.so.63
#2  0x00007f98a3f6d92d in std.concurrency._staticDtor4() () from /lib64/libphobos-ldc.so.63
#3  0x00007f98a3f6e6a6 in std.concurrency.__dtor() () from /lib64/libphobos-ldc.so.63
#4  0x00007f98a3fe4da4 in rt.minfo.rt_moduleTlsDtor() () from /lib64/libphobos-ldc.so.63
#5  0x00007f98a3fe3f5f in rt.dmain2._d_run_main() () from /lib64/libphobos-ldc.so.63
#6  0x00007f98a3fe3ea9 in _d_run_main () from /lib64/libphobos-ldc.so.63
#7  0x0000003e69a21b75 in __libc_start_main (main=0x4006b0, argc=1, ubp_av=0x7fff6b887ac8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, 
    stack_end=0x7fff6b887ab8) at libc-start.c:258
#8  0x0000000000400719 in _start ()

When i put a breakpoint into _d_toObject I can see that segfault on

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ca17a0 in _d_toObject (p=0x7ffff7823000) at cast_.d:32
32      ClassInfo oc = o.classinfo;
@dnadlinger
Copy link
Member

Should be fixed in Git master.

redstar pushed a commit that referenced this issue Sep 27, 2014
[trivial] Move printf into debug section.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants