From fa10faa72d8e9e97b6e564f8b0a7b602538d0da0 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Wed, 1 Dec 2021 23:56:28 +0100 Subject: d: Disable the D runtime garbage collector after initializing (PR103520) Not all targets that support building libdruntime have a stable garbage collector, so to avoid running into problems where live memory allocated by the D GC is freed, disable all in-flight collections until a time when scanning is more reliably implemented everywhere. PR d/103520 gcc/d/ChangeLog: * d-frontend.h (gc_disable): Declare. * d-lang.cc (d_init_options): Disable the D runtime garbage collector after initializing. --- gcc/d/d-lang.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/d/d-lang.cc') diff --git a/gcc/d/d-lang.cc b/gcc/d/d-lang.cc index d20370e..dbf7a8b 100644 --- a/gcc/d/d-lang.cc +++ b/gcc/d/d-lang.cc @@ -288,7 +288,7 @@ d_init_options (unsigned int, cl_decoded_option *decoded_options) { /* Initialize the D runtime. */ rt_init (); -// gc_disable (); + gc_disable (); /* Set default values. */ global._init (); -- cgit v1.1