Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Krell <jay.krell@cornell.edu>2018-10-11 23:46:09 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2018-10-11 23:46:09 +0300
commit0d308e5e9abd5a2f0d5b9ef546b666384ce8f246 (patch)
treebd8c36df32417e046429b863f77b37af983ea8df
parentc3fe80a0c43be780e35f3a4091d3dc1023b35a00 (diff)
x86 mono_arch_get_patch_offset: add support for 0xe9/jmp eip+32b. (#11089)
I don't know what the specific code is or what changed, etc. This addresses Mac/x86: https://jenkins.mono-project.com/job/test-mono-pull-request-i386-osx/15364/parsed_console/log.html ```Unable to compile method 'int Tests:calli_sig_check_2 ()' due to: 'Invalid IL code in Tests:calli_sig_check_2 (): IL_000b: calli 0x11000044``` which then fails an assert and fails overall. CI goes deep into bash w/o echoing commands but a repro is: cd mono/mini MONO_PATH=./../../mcs/class/lib/net_4_x lldb -- ./mono --aot iltests.exe The code is meant to be invalid, and meant to raise an exception, which is catchable/resumable (at least in the JIT case where executing IL the first time, can raise an exception while caller is running, vs. AOT where the codegen all happens offline -- leaving what? A note made at AOT time that calling the code should raise an exception?). It isn't meant to fail an assert in either case.
-rw-r--r--mono/mini/mini-x86.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mono/mini/mini-x86.c b/mono/mini/mini-x86.c
index 0a1719d62be..2cce00faab0 100644
--- a/mono/mini/mini-x86.c
+++ b/mono/mini/mini-x86.c
@@ -5874,10 +5874,11 @@ mono_arch_get_patch_offset (guint8 *code)
else if ((code [0] >= 0xb8) && (code [0] < 0xb8 + 8))
/* mov <REG>, imm */
return 1;
- else {
- g_assert_not_reached ();
- return -1;
- }
+ else if (code [0] == 0xE9)
+ /* jmp eip+32b */
+ return 1;
+ g_assert_not_reached ();
+ return -1;
}
/**