Issue 18763 - Segfault in garbage collector
Summary: Segfault in garbage collector
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: x86_64 Linux
: P2 critical
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-15 11:38 UTC by lieuwemo
Modified: 2023-06-22 13:07 UTC (History)
2 users (show)

See Also:


Attachments
Test case for segfault (1.37 KB, text/plain)
2018-04-15 14:43 UTC, Neia Neutuladh
Details

Note You need to log in before you can comment on or make changes to this issue.
Description lieuwemo 2018-04-15 11:38:06 UTC
This program gives a segfault somewhere in the garbage collector when ran with oscillofun.flac as input.
Comment 1 basile-z 2018-04-15 13:52:22 UTC
You forgot to upload an attachment apparently.
SEGFAULT by GC can be caused by a destructor that allocates.
destructor are not allowed to.
Comment 2 Neia Neutuladh 2018-04-15 14:43:56 UTC
Created attachment 1685 [details]
Test case for segfault

Added test case (as seen on IRC).

Stacktrace (also as seen on IRC):

Program received signal SIGSEGV, Segmentation fault.
0x00005555555d5b35 in _D2gc4impl12conservativeQw3Gcx11fullcollectMFNbbZm ()
(gdb) bt
#0 0x00005555555d5b35 in _D2gc4impl12conservativeQw3Gcx11fullcollectMFNbbZm ()
#1 0x00005555555d8856 in _D2gc4impl12conservativeQw14ConservativeGC__T9runLockedS_DQCeQCeQCcQCnQBs18fullCollectNoStackMFNbZ2goFNbPSQEaQEaQDyQEj3GcxZmTQvZQDfMFNbKQBgZm ()
#2 0x00005555555d2961 in _D2gc4impl12conservativeQw14ConservativeGC18fullCollectNoStackMFNbZv ()
#3 0x00005555555d2932 in _D2gc4impl12conservativeQw14ConservativeGC14collectNoStackMFNbZv ()
#4 0x00005555555e5cf1 in gc_term ()
#5 0x00005555555da3cb in rt_term ()
#6 0x00005555555c63b5 in rt.dmain2._d_run_main(int, char**, extern(C) int(char[][]) function).runAll() ()
#7 0x00005555555c6290 in rt.dmain2._d_run_main(int, char**, extern(C) int(char[][]) function).tryExec(scope void() delegate) ()
#8 0x00005555555c61fb in _d_run_main ()
#9 0x00005555555bbede in main ()
#10 0x00007ffff6bf2a87 in __libc_start_main (main=0x5555555bbebc <main>, argc=2, argv=0x7fffffffea68, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffea58)
at ../csu/libc-start.c:310
#11 0x00005555555b114a in _start ()
Comment 3 Vladimir Panteleev 2023-06-22 13:07:08 UTC
This bug is unreproducible as it is missing sndfile.d and the mentioned oscillofun.flac.