-
-
Notifications
You must be signed in to change notification settings - Fork 272
Description
One of my programs is exiting with:
Fatal error in EH code: _Unwind_RaiseException failed with reason code: 5
Abort trap: 6
Haven't seen this before, including on beta-1. This is on OSX. I haven't had time to narrow down a small use case yet. Apologies for that, but wanted to get an initial report out first, will try to generate a small reproducible case later, but might be a day before I can get to it.
General situation: It appears to be triggered via statements like:
throw new Exception(format("--format string--", value, value...)
from within an option handler (function) passed to std.getopt.getopt, with the getopt call within a try-catch expression. My programs have other occurrences of 'throw new Exception' within a getopt call, the ones failing are cases where a function was passed to getopt to handle the argument.
Build info:
$ ldc2 --version
LDC - the LLVM D compiler (1.0.0-beta2):
based on DMD v2.070.2 and LLVM 3.8.0
built with LDC - the LLVM D compiler (0.17.1)
Default target: x86_64-apple-darwin14.5.0
Host CPU: haswell
http://dlang.org - http://wiki.dlang.org/LDC
The failure is occurring in a publicly available program. To try to reproduce, clone the repository at: https://github.com/eBay/tsv-utils-dlang. Then:
$ cd tsv-utils-dlang/tsv-filter
$ make DCOMPILER=ldc2 test # Tests will fail
$ cat tests/latest_debug/error_tests_1.txt
The error_tests_1.txt file lists the command used and the error. Look for the ones starting with "Fatal error in EH code". The same commands can be run by hand. eg.
$ cd tsv-utils-dlang/tsv-filter
$ make DCOMPILER=ldc2
$ ../bin/tsv-filter --gt 0:10 tests/input1.tsv
Fatal error in EH code: _Unwind_RaiseException failed with reason code: 5
Abort trap: 6