Commit | Line | Data |
---|---|---|
a2120060 SS |
1 | From d80cfc83325f8e95d35ecd9f15b36b96fa9ed3ee Mon Sep 17 00:00:00 2001 |
2 | From: Simon South <simon@simonsouth.net> | |
3 | Date: Sat, 6 Jun 2020 18:56:56 -0400 | |
4 | Subject: [PATCH] Disable branch-patching | |
5 | ||
6 | This patch disables JamVM's branch-patching optimization, which tends | |
7 | to make JamVM fail with an "Illegal instruction" error on x86_64 (and | |
8 | possibly other architectures that use variable-length instructions) | |
9 | when built using modern versions of gcc and glibc. | |
10 | --- | |
11 | src/init.c | 4 ++-- | |
12 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
13 | ||
14 | diff --git a/src/init.c b/src/init.c | |
15 | index 32539cf..38ad54b 100644 | |
16 | --- a/src/init.c | |
17 | +++ b/src/init.c | |
18 | @@ -72,8 +72,8 @@ void setDefaultInitArgs(InitArgs *args) { | |
19 | #ifdef INLINING | |
20 | args->replication_threshold = 10; | |
21 | args->profile_threshold = 10; | |
22 | - args->branch_patching_dup = TRUE; | |
23 | - args->branch_patching = TRUE; | |
24 | + args->branch_patching_dup = FALSE; | |
25 | + args->branch_patching = FALSE; | |
26 | args->print_codestats = FALSE; | |
27 | args->join_blocks = TRUE; | |
28 | args->profiling = TRUE; | |
29 | -- | |
30 | 2.25.2 | |
31 |