https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242506
Gustavo Romero <gustavo.rom...@protonmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gustavo.romero@protonmail.c | |om --- Comment #3 from Gustavo Romero <gustavo.rom...@protonmail.com> --- (In reply to canardo from comment #0) Hello, canardo, This is a segfault in gcc9 selftest framework due to a wrong use o singleton dump_context get() method. This is the fix I intend to send upstream for review: commit e02cbe3668cc63c8da1fed404c306c1ed50235f3 Author: Gustavo Romero <grom...@linux.vnet.ibm.com> Date: Mon Dec 9 07:37:49 2019 -0500 devel/gcc9: Fix ICE due to wrong singleton get() use Currently get() method of singleton is being used in a way a new class is instantiated, which call singleton dtor's freeing memory that is referenced after free() is called generating an internal compiler error. Fix is simply call get() appropriately, i.e. call it directly since it's in fact an static method, just as usually any get method in a singleton is by design. diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c index 7ea8f85..fc17fe9 100644 --- a/gcc/dumpfile.c +++ b/gcc/dumpfile.c @@ -2076,7 +2076,7 @@ temp_dump_context::temp_dump_context (bool forcibly_enable_optinfo, bool forcibly_enable_dumping, dump_flags_t test_pp_flags) : m_context (), - m_saved (&dump_context ().get ()) + m_saved(&dump_context::get()) { dump_context::s_current = &m_context; if (forcibly_enable_optinfo) Could you please try and check if it fixes the error you've posted? Thanks. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"