mllib: Avoid OCaml local roots corruption.

Because we used 'return' directly, the effect of the CAMLparam0()
macro was not undone, resulting in local roots corruption when the
visit callback throws an exception.

The visit_tests unit test picked this up, but the corruption was only
seen on aarch64.

Fixes commit 4a62e52111.
This commit is contained in:
Richard W.M. Jones
2017-01-18 10:23:10 +00:00
parent 3a160fe16b
commit e035d848f7

View File

@@ -123,7 +123,7 @@ visitor_function_wrapper (const char *dir,
* return an error.
*/
*args->exnp = Extract_exception (v);
return -1;
CAMLreturnT (int, -1);
}
/* No error, return normally. */