You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Pavel Afremov (JIRA)" <ji...@apache.org> on 2007/10/26 21:36:51 UTC
[jira] Reopened: (HARMONY-5016) [drlvm][jit][opt] code patching may
corrupt calls to helpers on x86-64 in OPT mode
[ https://issues.apache.org/jira/browse/HARMONY-5016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Afremov reopened HARMONY-5016:
------------------------------------
Estimated Complexity: Unknown
Looks like proposed patch is not correct on 100%. After fixing insufficient stub size assertion (HARMONY-5034) JIT become asserts on
assert(bcOffset!=ILLEGAL_BC_MAPPING_VALUE || !InstUtils::instMustHaveBCMapping(inst)); in ...\vm\jitrino\src\codegenerator\ia32\Ia32CodeEmitter.cpp Ln 378.
> [drlvm][jit][opt] code patching may corrupt calls to helpers on x86-64 in OPT mode
> ----------------------------------------------------------------------------------
>
> Key: HARMONY-5016
> URL: https://issues.apache.org/jira/browse/HARMONY-5016
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: Linux x86-64
> Reporter: Pavel Afremov
> Assignee: Alexey Varlamov
> Priority: Critical
> Attachments: H5016.diff
>
>
> On Linux x86-64, DRL VM crashed by assert of null allocation handler (second parametr) in fast_gc_alloc.
> It called from JITed code
> at org.apache.harmony.kernel.vm.VM.<clinit>
> ...\drlvm\vm\vmcore\src\kernel_classes\javasrc\org\apache\harmony\kernel\vm\VM.java ln 120
> internedStrings = new InternMap(32768);
> The source of the bug is in folowing:
> 1. If ofset between callee and caller fits in 32 bits signed value, OPT generates following code:
> 0x00002aab0b490000: push %rbx
> 0x00002aab0b490001: mov $0x90edf5,%rbx
> 0x00002aab0b49000b: movb $0x0,(%rbx)
> 0x00002aab0b49000e: mov $0x90edf4,%rbx
> 0x00002aab0b490018: movb $0x0,(%rbx)
> 0x00002aab0b49001b: mov $0x20,%edi
> 0x00002aab0b490020: mov $0x2c68,%rsi
> 0x00002aab0b49002a: callq 0x2aaaac2bf950
> 2. If offset more then 32 bits signed value OPT generates following code:
> 0x00002aab49c90000: push %rbx
> 0x00002aab49c90001: mov $0x9665e5,%rbx
> 0x00002aab49c9000b: movb $0x0,(%rbx)
> 0x00002aab49c9000e: mov $0x9665e4,%rbx
> 0x00002aab49c90018: movb $0x0,(%rbx)
> 0x00002aab49c9001b: mov $0x20,%edi
> 0x00002aab49c90020: mov $0x2aaaac2bf950,%r11
> 0x00002aab49c9002a: data16
> 0x00002aab49c9002b: nop
> 0x00002aab49c9002c: rex64Z callq *%r11
> In this code second parameter is missed, rsi is not initialized, and fast_gc_alloc asserts by this reason.
> I think that this bug can be reproduced on any x86-64 platform, both Linux and Windows.
> But I can reproduce it on Linux x86-64 machine only.
> To reproduce the bug, run any class or test in OPT mode with large heap on Linux x86-64 debug build, like in following command:
> .../jdk/jre/bin/java -Xem:opt -Xmx3500m Hi
> DRLVM in JET mode works OK.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.