Created
November 26, 2012 05:16
-
-
Save kosaki/4146711 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/bignum.c b/bignum.c | |
index 97be53f..47d9689 100644 | |
--- a/bignum.c | |
+++ b/bignum.c | |
@@ -2788,6 +2788,7 @@ bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volati | |
while (j--) zds[j] = xds[j]; | |
} | |
+ retry: | |
bds.nx = nx; | |
bds.ny = ny; | |
bds.zds = zds; | |
@@ -2795,6 +2796,11 @@ bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volat | |
bds.stop = Qfalse; | |
if (nx > 10000 || ny > 10000) { | |
rb_thread_call_without_gvl(bigdivrem1, &bds, rb_big_stop, &bds.stop); | |
+ | |
+ if (bds.stop == Qtrue) { | |
+ /* execute trap handler, but exception was not raised. */ | |
+ goto retry; | |
+ } | |
} | |
else { | |
bigdivrem1(&bds); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment