Skip to content

Commit 5c7acad

Browse files
committed
[libobjc2]: Fix exception handling
libobjc2 used Vectored Exception Handlers to catch uncaught exceptions on mingw. This implementation is too greedy, and invokes `_objc_unexpected_exception` for (certain) exceptions which would be handled by the application itself. This patch `_Unwind_RaiseException` to throw exceptions instead of `__cxa_throw`, allowing us to process unhandled exceptions. Upstream PR: gnustep/libobjc2#278
1 parent 1436be0 commit 5c7acad

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mingw-w64-libobjc2/PKGBUILD

+6-2
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,22 @@ source=("https://github.com/gnustep/${_realname}/archive/v${pkgver}/${_realname}
2121
# Support building on msys/clang64
2222
"https://github.com/gnustep/libobjc2/commit/1ff5e1298dd76aa370d5a12b690857f9a47b4b56.patch"
2323
# MinGW: Remove manual setting of library prefix/suffix
24-
"https://github.com/gnustep/libobjc2/commit/f983cdbf683925d942dd1d86edcfe4316bf9ed6c.patch")
24+
"https://github.com/gnustep/libobjc2/commit/f983cdbf683925d942dd1d86edcfe4316bf9ed6c.patch"
25+
# MinGW: Use _Unwind_RaiseException to throw exceptions
26+
"https://github.com/gnustep/libobjc2/commit/38ebb38bcd5b4af43ddb87a5f34bc4b907795f82.patch")
2527
sha256sums=('c4c5cede579949249f16736c9b1f85c58c44addb013f59970dcb566d9069152a'
2628
'aaa23146b3c2ec442b5dbf20606020bddd15230041ad738ef3a06e92d13605c3'
2729
'fba7d33aa03ee7383b559c5b845063acd16b45396520250849f22559577adcc9'
28-
'd955fcee075af724a97d63f1b325e97ab6c3d018ac38f0597ef3e8c57b0820e2')
30+
'd955fcee075af724a97d63f1b325e97ab6c3d018ac38f0597ef3e8c57b0820e2'
31+
'9bc16c12d0cf0f4e2aab4d7222aa6b4ffa6055ae30e40890d7e0e972db6dd532')
2932

3033
prepare() {
3134
cd ${srcdir}/${_realname}-${pkgver}
3235

3336
patch -p1 -i ${srcdir}/639c676bb8033422539e19a2e2888bdbd06507e5.patch
3437
patch -p1 -i ${srcdir}/1ff5e1298dd76aa370d5a12b690857f9a47b4b56.patch
3538
patch -p1 -i ${srcdir}/f983cdbf683925d942dd1d86edcfe4316bf9ed6c.patch
39+
patch -p1 -i ${srcdir}/38ebb38bcd5b4af43ddb87a5f34bc4b907795f82.patch
3640
}
3741

3842
build() {

0 commit comments

Comments
 (0)