public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/98025] New: [11 Regression][CET] libphobos: dub segfaults when built with gdc 11
@ 2020-11-27  9:20 ibuclaw at gdcproject dot org
  2020-11-27 10:53 ` [Bug d/98025] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-11-27  9:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98025

            Bug ID: 98025
           Summary: [11 Regression][CET] libphobos: dub segfaults when
                    built with gdc 11
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: ibuclaw at gdcproject dot org
  Target Milestone: ---

Following on from pr95680, the layout of the Fiber class changes when libphobos
is built with -fversion=CET.  This breaks user code that implement their own
fibers based off core.thread unless they also compile with -fversion=CET as
well.

So when libphobos is compiled with --enable-cet, this needs to be also recorded
in gcc.config to persist in the ABI.  Not just as an internal implementation
detail.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug d/98025] [11 Regression][CET] libphobos: dub segfaults when built with gdc 11
  2020-11-27  9:20 [Bug d/98025] New: [11 Regression][CET] libphobos: dub segfaults when built with gdc 11 ibuclaw at gdcproject dot org
@ 2020-11-27 10:53 ` rguenth at gcc dot gnu.org
  2020-11-27 20:28 ` cvs-commit at gcc dot gnu.org
  2020-11-27 20:34 ` ibuclaw at gdcproject dot org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-27 10:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98025

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-*-* i?86-*-*
   Target Milestone|---                         |11.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug d/98025] [11 Regression][CET] libphobos: dub segfaults when built with gdc 11
  2020-11-27  9:20 [Bug d/98025] New: [11 Regression][CET] libphobos: dub segfaults when built with gdc 11 ibuclaw at gdcproject dot org
  2020-11-27 10:53 ` [Bug d/98025] " rguenth at gcc dot gnu.org
@ 2020-11-27 20:28 ` cvs-commit at gcc dot gnu.org
  2020-11-27 20:34 ` ibuclaw at gdcproject dot org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-27 20:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98025

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>:

https://gcc.gnu.org/g:5dbab7b3f4d3a8298aeb8ecde1cfbc4b16913d28

commit r11-5506-g5dbab7b3f4d3a8298aeb8ecde1cfbc4b16913d28
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Fri Nov 27 13:15:44 2020 +0100

    libphobos: Fix segfault at run-time when using custom Fibers (PR 98025)

    When libphobos is configured with --enable-cet, this adds extra fields
    to the Fiber class to support the ucontext_t fallback implementation.
    These fields get omitted when compiling user code unless they also used
    `-fversion=CET' to build their project, which resulted in data being
    overwritten from within swapcontext().

    On reviewing the ucontext_t definitions, it was found that the shadow
    stack fields were missing, and the struct size didn't match up on X32.
    This has been fixed in upstream druntime and merged down here.

    Reviewed-on: https://github.com/dlang/druntime/pull/3293

    libphobos/ChangeLog:

            PR d/98025
            * Makefile.in: Regenerate.
            * configure: Regenerate.
            * configure.ac (DCFG_ENABLE_CET): Substitute.
            * libdruntime/MERGE: Merge upstream druntime 0fe7974c.
            * libdruntime/Makefile.in: Regenerate.
            * libdruntime/core/thread.d: Import gcc.config.
            (class Fiber): Add ucontext_t fields when GNU_Enable_CET is true.
            * libdruntime/gcc/config.d.in (GNU_Enable_CET): Define.
            * src/Makefile.in: Regenerate.
            * testsuite/Makefile.in: Regenerate.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug d/98025] [11 Regression][CET] libphobos: dub segfaults when built with gdc 11
  2020-11-27  9:20 [Bug d/98025] New: [11 Regression][CET] libphobos: dub segfaults when built with gdc 11 ibuclaw at gdcproject dot org
  2020-11-27 10:53 ` [Bug d/98025] " rguenth at gcc dot gnu.org
  2020-11-27 20:28 ` cvs-commit at gcc dot gnu.org
@ 2020-11-27 20:34 ` ibuclaw at gdcproject dot org
  2 siblings, 0 replies; 4+ messages in thread
From: ibuclaw at gdcproject dot org @ 2020-11-27 20:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98025

Iain Buclaw <ibuclaw at gdcproject dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Fixed committed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-27 20:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27  9:20 [Bug d/98025] New: [11 Regression][CET] libphobos: dub segfaults when built with gdc 11 ibuclaw at gdcproject dot org
2020-11-27 10:53 ` [Bug d/98025] " rguenth at gcc dot gnu.org
2020-11-27 20:28 ` cvs-commit at gcc dot gnu.org
2020-11-27 20:34 ` ibuclaw at gdcproject dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).