[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 362/437: Avoid problems if JIT_INSTR_MAX is miscalculate
From: |
Andy Wingo |
Subject: |
[Guile-commits] 362/437: Avoid problems if JIT_INSTR_MAX is miscalculated |
Date: |
Mon, 2 Jul 2018 05:14:56 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit fb21cf9f3806845ec3f3da704432a3759618a7b5
Author: pcpa <address@hidden>
Date: Sat Feb 7 17:08:43 2015 -0200
Avoid problems if JIT_INSTR_MAX is miscalculated
* lib/jit_size.c: Preventively use at least 144 bytes
if JIT_INSTR_MAX is less than it. The logic is not
guaranteed to be 100% precise, it is mostly heuristics
to allocate a buffer with as close as possible size,
but a wrong value may cause code generation to write
past the end of the buffer.
---
ChangeLog | 9 +++++++++
lib/jit_size.c | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 0a6fa04..336bf07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-02-07 Paulo Andrade <address@hidden>
+
+ * lib/jit_size.c: Preventively use at least 144 bytes
+ if JIT_INSTR_MAX is less than it. The logic is not
+ guaranteed to be 100% precise, it is mostly heuristics
+ to allocate a buffer with as close as possible size,
+ but a wrong value may cause code generation to write
+ past the end of the buffer.
+
2015-02-03 Paulo Andrade <address@hidden>
* lib/lightning.c: Correct the reason the bug in
diff --git a/lib/jit_size.c b/lib/jit_size.c
index ae4c633..612417e 100644
--- a/lib/jit_size.c
+++ b/lib/jit_size.c
@@ -110,7 +110,7 @@ _jit_get_size(jit_state_t *_jit)
jit_word_t
jit_get_max_instr(void)
{
- return (JIT_INSTR_MAX);
+ return (JIT_INSTR_MAX >= 144 ? JIT_INSTR_MAX : 144);
}
void
- [Guile-commits] 170/437: Test and correct test cases in all current backends., (continued)
- [Guile-commits] 170/437: Test and correct test cases in all current backends., Andy Wingo, 2018/07/02
- [Guile-commits] 368/437: Implement jit_allocar for dynamic stack allocation, Andy Wingo, 2018/07/02
- [Guile-commits] 355/437: Update documentation on jit_frame and jit_tramp, Andy Wingo, 2018/07/02
- [Guile-commits] 323/437: misc: Make jit_note and related functions take a const argument, Andy Wingo, 2018/07/02
- [Guile-commits] 429/437: Remove disassembler support from lightning, Andy Wingo, 2018/07/02
- [Guile-commits] 346/437: PPC: Build and pass all tests in powerpcle, Andy Wingo, 2018/07/02
- [Guile-commits] 180/437: Correct C sequence point problem., Andy Wingo, 2018/07/02
- [Guile-commits] 370/437: Add missing ellipsis in allocar.tst, Andy Wingo, 2018/07/02
- [Guile-commits] 337/437: Remove a wrong optimization of callee save registers, Andy Wingo, 2018/07/02
- [Guile-commits] 437/437: Wire up lightning into libguile build, Andy Wingo, 2018/07/02
- [Guile-commits] 362/437: Avoid problems if JIT_INSTR_MAX is miscalculated,
Andy Wingo <=
- [Guile-commits] 183/437: Correct qmul and qdiv in ppc., Andy Wingo, 2018/07/02
- [Guile-commits] 235/437: Correct build on FreeBSD/amd64, Andy Wingo, 2018/07/02
- [Guile-commits] 240/437: Correct wrong test and update of arm thumb offset information., Andy Wingo, 2018/07/02
- [Guile-commits] 215/437: Add functional hppa port. All tests pass., Andy Wingo, 2018/07/02
- [Guile-commits] 369/437: Correct typo in x87.nodata test list, Andy Wingo, 2018/07/02
- [Guile-commits] 307/437: x86: Build and pass all tests on 32 bit cygwin, Andy Wingo, 2018/07/02
- [Guile-commits] 401/437: Implement a correct generation of Fibonacci numbers., Andy Wingo, 2018/07/02
- [Guile-commits] 318/437: Add label predicates, Andy Wingo, 2018/07/02
- [Guile-commits] 373/437: Update copyright date, Andy Wingo, 2018/07/02
- [Guile-commits] 403/437: Correct wrong movr simplification, Andy Wingo, 2018/07/02