This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,11 @@ extern(C) void _d_throwdwarf(Throwable o)
229
229
* try/catch.
230
230
*/
231
231
fprintf(stderr, " uncaught exception\n " );
232
+ /**
233
+ As _d_print_throwable() itself may throw multiple times when calling core.demangle,
234
+ and with the uncaught exception still on the EH stack, this doesn't bode well with core.demangle's error recovery.
235
+ */
236
+ __dmd_begin_catch(&eh.exception_object);
232
237
_d_print_throwable(o);
233
238
abort();
234
239
assert (0 );
Original file line number Diff line number Diff line change @@ -46,11 +46,14 @@ $(ROOT)/unknown_gc.done: STDERR_EXP="'unknowngc'"
46
46
$(ROOT ) /static_dtor.done : STDERR_EXP="dtor_called_more_than_once"
47
47
$(ROOT ) /future_message.done : STDERR_EXP="exception I have a custom message. exception exception "
48
48
$(ROOT ) /static_dtor.done : NEGATE=!
49
- $(ROOT ) /rt_trap_exceptions.done : STDERR_EXP="uncaught exception\nobject .Exception@rt_trap_exceptions.d(11 ): exception "
50
- $(ROOT ) /rt_trap_exceptions.done : NEGATE=!
49
+ $(ROOT ) /rt_trap_exceptions.done : STDERR_EXP="object .Exception@src/ rt_trap_exceptions.d(12 ): this will abort "
50
+ $(ROOT ) /rt_trap_exceptions.done : STDERR_EXP2="src/rt_trap_exceptions.d:8 main"
51
51
$(ROOT ) /% .done : $(ROOT ) /%
52
52
@echo Testing $*
53
53
$(NEGATE ) $(QUIET )$(TIMELIMIT )$(ROOT ) /$* $(RUN_ARGS ) 2>&1 1> /dev/null | grep -qF $(STDERR_EXP )
54
+ if [ ! -z " $( STDERR_EXP2) " ] ; then \
55
+ $(NEGATE ) $(QUIET )$(TIMELIMIT )$(ROOT ) /$* $(RUN_ARGS ) 2>&1 1> /dev/null | grep -qF $(STDERR_EXP2 ) ; \
56
+ fi
54
57
@touch $@
55
58
56
59
$(ROOT ) /unittest_assert : DFLAGS+=-unittest
You can’t perform that action at this time.
0 commit comments