On Fri, 2014-01-24 at 16:32 +0000, Brian Drummond wrote:
> On Thu, 2014-01-23 at 22:12 -0500, Brian Davis wrote:
> > Brian Drummond wrote:
> > >
> > > " GNA dir bug16782:
> > > <snip>
> > > " This application has requested the Runtime to terminate
> > > " it in an unusual way."
> It doesn't seem to be a crash per se; more like a clean abort but with a
> return code that Windows doesn't recognise (it possibly used to, but has
> been re-classified as a problem).
>
> The attached patch is intended to allow the simulation to return in a
> more conventional manner : can you try it and report?
This may be better : it should leave the main simulation loop rather
than attempting to continue after the error.
- Brian
diff -r 805ea23023fc translate/grt/config/win32.c
--- a/translate/grt/config/win32.c Fri Jan 24 06:55:07 2014 +0100
+++ b/translate/grt/config/win32.c Sun Jan 26 12:00:11 2014 +0000
@@ -155,6 +155,7 @@
void *DispatcherContext)
{
const char *msg = "";
+ int ret = 1;
switch (ExceptionRecord->ExceptionCode)
{
@@ -179,7 +180,8 @@
break;
case EXCEPTION_INT_OVERFLOW:
- grt_overflow_error ();
+ ret = -1;
+ msg = "overflow_error";
break;
case EXCEPTION_STACK_OVERFLOW:
@@ -194,7 +196,7 @@
/* FIXME: is it correct? */
fprintf (stderr, "exception raised: %s\n", msg);
- __ghdl_maybe_return_via_longjump (1);
+ __ghdl_maybe_return_via_longjump (ret);
return 0; /* This is never reached, avoid compiler warning */
}
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss