Date: Mon, 09 Dec 2019 12:46:17 +0000 From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 242506] [PowerPC] lang/gcc9: cc1: internal compiler error: Segmentation fault (on FreeBSD 12.1-RELEASE-p1) Message-ID: <bug-242506-29464-8tPv9LGq8L@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-242506-29464@https.bugs.freebsd.org/bugzilla/> References: <bug-242506-29464@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242506 Gustavo Romero <gustavo.romero@protonmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gustavo.romero@protonmail.c | |om --- Comment #3 from Gustavo Romero <gustavo.romero@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 <gromero@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 refere= nced 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 =3D &m_context; if (forcibly_enable_optinfo) Could you please try and check if it fixes the error you've posted? Thanks. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-242506-29464-8tPv9LGq8L>