wingo pushed a commit to branch lightning
in repository guile.
commit 5eb3c3602f198165e06652ced69fd4d660329bbc
Author: pcpa <[email protected]>
Date: Fri Dec 26 00:38:54 2014 -0200
ARM: Better check for constants offset overflow
* lib/jit_arm.c: Better check for need to flush constants
before the pool being no longer reachable.
---
ChangeLog | 5 +++++
lib/jit_arm.c | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 13c1363..eaa3134 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-26 Paulo Andrade <[email protected]>
+
+ * lib/jit_arm.c: Better check for need to flush constants
+ before the pool being no longer reachable.
+
2014-12-25 Paulo Andrade <[email protected]>
* include/lightning.h: Split jit_htonr in the new 3 interfaces
diff --git a/lib/jit_arm.c b/lib/jit_arm.c
index a9a60f2..a77ee93 100644
--- a/lib/jit_arm.c
+++ b/lib/jit_arm.c
@@ -1532,8 +1532,9 @@ _emit_code(jit_state_t *_jit)
jit_reglive(node);
if (_jitc->consts.length &&
- (jit_uword_t)_jit->pc.uc -
- (jit_uword_t)_jitc->consts.patches[0] >= 3968) {
+ (_jit->pc.uc - _jitc->consts.data >= 3968 ||
+ (jit_uword_t)_jit->pc.uc -
+ (jit_uword_t)_jitc->consts.patches[0] >= 3968)) {
/* longest sequence should be 64 bytes, but preventively
* do not let it go past 128 remaining bytes before a flush */
if (node->next &&