@@ -1,5 +1,13 @@
2013-10-21 David Malcolm <dmalcolm@redhat.com>
+ * internal-api.c (gcc::jit::context::compile): Correctly cleanup
+ timevars in error-handling, preventing an issue where an error
+ on a context left timevar.c in an unstopped state, leading to an
+ assertion failure when restarting timevars in the next compile.
+ Found via fuzz-testing.
+
+2013-10-21 David Malcolm <dmalcolm@redhat.com>
+
* internal-api.c (gcc::jit::context::postprocess): Show source
line numbers (if any) in gimple dump.
@@ -1261,7 +1261,11 @@ compile ()
active_jit_ctxt = NULL;
if (errors_occurred ())
- goto error;
+ {
+ timevar_stop (TV_TOTAL);
+ timevar_print (stderr);
+ goto error;
+ }
timevar_push (TV_ASSEMBLE);
@@ -1279,7 +1283,12 @@ compile ()
printf ("cmd: %s\n", cmd);
int ret = system (cmd);
if (ret)
- goto error;
+ {
+ timevar_pop (TV_ASSEMBLE);
+ timevar_stop (TV_TOTAL);
+ timevar_print (stderr);
+ goto error;
+ }
}
timevar_pop (TV_ASSEMBLE);