Fwd: Fedora 32 Self-Contained Change proposal: Switch mingw32 toolchain to dwarf-2 exceptions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Manually forwarding to devel-announce as we work out some tooling issues)

---------- Forwarded message ---------
From: <bcotton@xxxxxxxxxx>
Date: Wed, Aug 28, 2019 at 4:23 PM
Subject: Fedora 32 Self-Contained Change proposal: Switch mingw32
toolchain to dwarf-2 exceptions
To: <devel@xxxxxxxxxxxxxxxxxxxxxxx>, <devel-announce@xxxxxxxxxxxxxxxxxxxxxxx>


== Issue Link ==
https://teams.fedoraproject.org/project/changes-tracker/issue2

== Summary ==
Switch the mingw32 toolchain to dwarf-2 exceptions, instead of SJLJ.

== owner ==
smani

== Detailed Description ==
# Detailed Description

The two exception modes supported by mingw32 targets are SJLJ
(currently used in Fedora, and still default upstream), and the more
recent dwarf-2. According to various sources [1][2][3], the key
differences between the two are:

SJLJ (setjmp/longjmp):

* not "zero-cost": even if an exception isn't thrown, it incurs a
minor performance penalty (~15% in exception heavy code)
* allows exceptions to traverse through e.g. windows callbacks

DWARF (DW2, dwarf-2):

* no permanent runtime overhead
* needs whole call stack to be dwarf-enabled, which means exceptions
cannot be thrown over e.g. Windows system DLLs (i.e. throwing an
exception in a system DLL callback and attempting to catch it won't
work)
* DW2 potentially generates bigger libraries. The overhead however is
not big (< 10%) for typical applications.

The main reason for switching to dwarf-2 is that rust can only be
compiled to a MinGW toolchain targeting dwarf exceptions on 32-bit
[4], and rust usage is starting to appear in some packages (i.e.
librsvg2). Switching to dwarf-2 on mingw32 would hence allow to keep
the same consistent package offering between mingw32 and mingw64,
whereas otherwise one would need to either freeze the mingw32 variants
at older versions, or remove them altogether.

* [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=540782
* [2] https://sourceforge.net/p/mingw-w64/mailman/message/30532139/
* [3] https://wiki.qt.io/MinGW-64-bit#Exception_handling:_SJLJ.2C_DWARF.2C_and_SEH
* [4] https://github.com/rust-lang/rust/issues/12859#issuecomment-185081071


# Benefit to Fedora

Continue being able to ship the same package set on mingw32 as well as mingw64.

# Scope
## Proposal owners:
GCC for mingw32 will be built with `--disable-sjlj-exceptions
--with-dwarf2` and all `mingw-*` packages rebuilt.

## Other developers:
None

## Release engineering
Rebuild in a side-tag

# Upgrade/compatibility impact
No impact

# Contingency Plan
* Contingency mechanism: Revert to SJLJ
* Contingency deadline: Before release
* Blocks release? Yes
* Blocks product? No

# Documentation
None

# Release Notes
The mingw32 toolchain in Fedora 32 uses the dwarf-2 exception model
instead of SJLJ.


-- 
Ben Cotton
He / Him / His
Fedora Program Manager
Red Hat
TZ=America/Indiana/Indianapolis
_______________________________________________
devel-announce mailing list -- devel-announce@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-announce-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel-announce@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux