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/22 13:08:50 UTC

[jira] Created: (HARMONY-4991) [jit] Fix compressed references support for heaps up to 4Gb

[jit] Fix compressed references support for heaps up to 4Gb
-----------------------------------------------------------

                 Key: HARMONY-4991
                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: Linux x86-64 & Windows x86-64
            Reporter: Pavel Afremov
            Priority: Critical


I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 

at java.lang.AbstractStringBuilder.append0() 
    (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
at HeapTest.func() 
    (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
at HeapTest.main() 
    (Ln 6, .\HeapTest.java " test.func();") 

The source of it is incorrect signed extension of 32 bit value to 64 bit register (marked by red in attached assembly code). 

0000000005967D47 mov eax,dword ptr [rbx+8] 
0000000005967D4A movsxd rax,eax 
0000000005967D4D mov rsi,7FFF0000h 
0000000005967D57 mov r12,rax 
0000000005967D5A add r12,rsi 
0000000005967D5D mov qword ptr [rsp],r12 
0000000005967D61 mov rax,7FFF0000h 
0000000005967D6B cmp r12,rax 
0000000005967D6E je 0000000005967E05 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537077 ] 

Pavel Afremov commented on HARMONY-4991:
----------------------------------------

DRLVM crashes in OPT mode on Linux x86-64 if heap size is more 2Gb. In JET mode DRL VM works OK.

> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff, H4991improved.diff, HeapTest.java
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-4991:
-------------------------------------

    Attachment: H4991final.diff

Final fix gets rid of 3 extra move instructions, so now 2 instructions are used for load& uncomress instance field instead of 5.

> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff, H4991final.diff, H4991improved.diff, HeapTest.java
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536780 ] 

Pavel Afremov commented on HARMONY-4991:
----------------------------------------

Oh no. Strange crash in default mixed mode. I am evaluate it tomorow.

> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff, HeapTest.java
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537287 ] 

Alexey Varlamov commented on HARMONY-4991:
------------------------------------------

Reproduced on SLES9, VM crashes at startup if the heap is bigger than 1980M. 
Somehow the generated code of java/util/HashMap.computeMaxSize() becomes corrupt and bad address is called instead of helper. Magic of numbers ;)

> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff, H4991improved.diff, HeapTest.java
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Afremov updated HARMONY-4991:
-----------------------------------

    Attachment: HeapTest.java

You can use HeapTest from HARMONY-4982 to reproduce a segmentation fault.

Also I add here advanced test which checks works with objects more closely.


> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff, HeapTest.java
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-4991:
-------------------------------------

    Attachment:     (was: H4991final.diff)

> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff, H4991final.diff, H4991improved.diff, HeapTest.java
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-4991:
-------------------------------------

    Attachment: H4991improved.diff

Could not reproduce crash in default mode so far. BTW, here is the improved fix, which also gets rid of intermediate move.

> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff, H4991improved.diff, HeapTest.java
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537379 ] 

Pavel Afremov commented on HARMONY-4991:
----------------------------------------

I split crash on Linux in separate JIRA HARMONY-5016 .

Thanks.

> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff, H4991improved.diff, HeapTest.java
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4991) [jit] Fix compressed references support for heaps up to 4Gb

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Afremov updated HARMONY-4991:
-----------------------------------

    Description: 
I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 

at java.lang.AbstractStringBuilder.append0() 
    (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
at HeapTest.func() 
    (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
at HeapTest.main() 
    (Ln 6, .\HeapTest.java " test.func();") 

The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code). 

0000000005967D47 mov eax,dword ptr [rbx+8] 
0000000005967D4A movsxd rax,eax 
0000000005967D4D mov rsi,7FFF0000h 
0000000005967D57 mov r12,rax 
0000000005967D5A add r12,rsi 
0000000005967D5D mov qword ptr [rsp],r12 
0000000005967D61 mov rax,7FFF0000h 
0000000005967D6B cmp r12,rax 
0000000005967D6E je 0000000005967E05 


  was:
I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 

at java.lang.AbstractStringBuilder.append0() 
    (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
at HeapTest.func() 
    (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
at HeapTest.main() 
    (Ln 6, .\HeapTest.java " test.func();") 

The source of it is incorrect signed extension of 32 bit value to 64 bit register (marked by red in attached assembly code). 

0000000005967D47 mov eax,dword ptr [rbx+8] 
0000000005967D4A movsxd rax,eax 
0000000005967D4D mov rsi,7FFF0000h 
0000000005967D57 mov r12,rax 
0000000005967D5A add r12,rsi 
0000000005967D5D mov qword ptr [rsp],r12 
0000000005967D61 mov rax,7FFF0000h 
0000000005967D6B cmp r12,rax 
0000000005967D6E je 0000000005967E05 



> [jit] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Priority: Critical
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-4991:
-------------------------------------

    Patch Info: [Patch Available]

Will commit the test after running tests overnight - and you may verify the fix in parallel ;)

> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov resolved HARMONY-4991.
--------------------------------------

    Resolution: Fixed

Well, the final patch is not quite correct and will be re-done as a part of HARMONY-5022, so I applied "improved" version at revision: 588504. 
I don't think we can afford a common regression test for this issue - please verify and close.

> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff, H4991final.diff, H4991improved.diff, HeapTest.java
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-4991) [jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov reassigned HARMONY-4991:
----------------------------------------

    Assignee: Alexey Varlamov

> [jit][opt] Fix compressed references support for heaps up to 4Gb
> ----------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537076 ] 

Pavel Afremov commented on HARMONY-4991:
----------------------------------------

Looks like crash is an other bug, and isn't related to large heap.
I reproduced bug on 30 Mb heap. So I split this bug to separate JIRA HARMONY-5009.


> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff, H4991improved.diff, HeapTest.java
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536778 ] 

Pavel Afremov commented on HARMONY-4991:
----------------------------------------

New test works OK with the patch.

Thanks.

> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff, HeapTest.java
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Afremov closed HARMONY-4991.
----------------------------------


> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff, H4991final.diff, H4991improved.diff, HeapTest.java
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4991) [jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Afremov updated HARMONY-4991:
-----------------------------------

    Summary: [jit][opt] Fix compressed references support for heaps up to 4Gb  (was: [jit] Fix compressed references support for heaps up to 4Gb)

> [jit][opt] Fix compressed references support for heaps up to 4Gb
> ----------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Priority: Critical
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-4991:
-------------------------------------

    Attachment: H4991final.diff

> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff, H4991final.diff, H4991improved.diff, HeapTest.java
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4991) [jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Afremov updated HARMONY-4991:
-----------------------------------

    Description: 
I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 

at java.lang.AbstractStringBuilder.append0() 
    (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
at HeapTest.func() 
    (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
at HeapTest.main() 
    (Ln 6, .\HeapTest.java " test.func();") 

The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 

0000000005967D47 mov eax,dword ptr [rbx+8] 
0000000005967D4A movsxd rax,eax 
0000000005967D4D mov rsi,7FFF0000h 
0000000005967D57 mov r12,rax 
0000000005967D5A add r12,rsi 
0000000005967D5D mov qword ptr [rsp],r12 
0000000005967D61 mov rax,7FFF0000h 
0000000005967D6B cmp r12,rax 
0000000005967D6E je 0000000005967E05 


  was:
I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 

at java.lang.AbstractStringBuilder.append0() 
    (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
at HeapTest.func() 
    (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
at HeapTest.main() 
    (Ln 6, .\HeapTest.java " test.func();") 

The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code). 

0000000005967D47 mov eax,dword ptr [rbx+8] 
0000000005967D4A movsxd rax,eax 
0000000005967D4D mov rsi,7FFF0000h 
0000000005967D57 mov r12,rax 
0000000005967D5A add r12,rsi 
0000000005967D5D mov qword ptr [rsp],r12 
0000000005967D61 mov rax,7FFF0000h 
0000000005967D6B cmp r12,rax 
0000000005967D6E je 0000000005967E05 



> [jit][opt] Fix compressed references support for heaps up to 4Gb
> ----------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Priority: Critical
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-4991:
-------------------------------------

    Summary: [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb  (was: [jit][opt] Fix compressed references support for heaps up to 4Gb)

> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4991) [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-4991:
-------------------------------------

    Attachment: H4991.diff

Pavel, thanks for the initial analysis provided, it speeded up the fix.

> [drlvm][jit][opt] Fix compressed references support for heaps up to 4Gb
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4991
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4991
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Linux x86-64 & Windows x86-64
>            Reporter: Pavel Afremov
>            Assignee: Alexey Varlamov
>            Priority: Critical
>         Attachments: H4991.diff
>
>
> I tried to run DRL VM in OPT mode with patch from HARMONY-4982 . The result is sigsegv in jited code. 
> at java.lang.AbstractStringBuilder.append0() 
>     (Ln 168, ...\classlib\modules\luni\src\main\java\java\lang\AbstractStringBuilder.java " if (newSize > value.length) {") 
> at HeapTest.func() 
>     (Ln 15, .\HeapTest.java " System.out.println("iteration " + i);") 
> at HeapTest.main() 
>     (Ln 6, .\HeapTest.java " test.func();") 
> The source of it is incorrect signed extension of 32 bit value to 64 bit register (see attached assembly code 0000000005967D4A ). 
> 0000000005967D47 mov eax,dword ptr [rbx+8] 
> 0000000005967D4A movsxd rax,eax 
> 0000000005967D4D mov rsi,7FFF0000h 
> 0000000005967D57 mov r12,rax 
> 0000000005967D5A add r12,rsi 
> 0000000005967D5D mov qword ptr [rsp],r12 
> 0000000005967D61 mov rax,7FFF0000h 
> 0000000005967D6B cmp r12,rax 
> 0000000005967D6E je 0000000005967E05 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.