Description
Seen this error before. Very similar to #1512. Occurs in-conjunction with exception handling being used to process erroneous command line arguments. This time with the tsv-filter
program in tsv-utils. So a fair bit of exception handling. Example:
$ tsv-filter --regex z:abc foobar.tsv
Fatal error in EH code: _Unwind_RaiseException failed with reason code: 5
Abort trap: 6
This will result from an exception raised by trying to convert z
to a size_t
using std.conv.to!size_t
. It only seems to happen with a few exception handling cases.
This is with LDC 1.3 on OSX (xcode 8.3.3). Only occurs with optimized builds using -flto=full
. Does not get triggered with -flto=thin
or having no flto
option. Interestingly, it did not occur when Phobos is built with LTO support (as described in #2168). Using -flto=full
did not cause a problem in this case. (Note that #2168 involved std.conv.to!double
. Possible relationship?) Also, does not occur with LDC 1.2, this is new in 1.3.
I have switched my programs to use -flto=thin
. This appears to work fine, so it is not a pressing issue for me. Naturally, my quick attempts to produce a simplified case did not succeed.
For these reasons (and the time spent on #2168), I'm not planning on further investigation unless requested. It'd of course be nice if adding Phobos LTO support addressed this as well as #2168.