You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Xiaoming Gu (JIRA)" <ji...@apache.org> on 2008/11/24 10:02:44 UTC
[jira] Created: (HARMONY-6027) [drlvm][jit] An undetected register
interference in graph coloring register allocation
[drlvm][jit] An undetected register interference in graph coloring register allocation
--------------------------------------------------------------------------------------
Key: HARMONY-6027
URL: https://issues.apache.org/jira/browse/HARMONY-6027
Project: Harmony
Issue Type: Bug
Environment: IA32 Windows
Reporter: Xiaoming Gu
When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
with early_prop
0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
without early_prop
0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for DH modification.
This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6027) [drlvm][jit] An incorrect register
assignment in graph coloring register allocation
Posted by "Xiaoming Gu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiaoming Gu updated HARMONY-6027:
---------------------------------
Attachment: (was: H6027-V1.patch)
> [drlvm][jit] An incorrect register assignment in graph coloring register allocation
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-6027
> URL: https://issues.apache.org/jira/browse/HARMONY-6027
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: IA32 Windows
> Reporter: Xiaoming Gu
> Attachments: H6027-V1.patch
>
>
> When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
> with early_prop
> 0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
> without early_prop
> 0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
> 0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
> After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for the above modification on DH.
> This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6027) [drlvm][jit] An undetected
interference in graph coloring register allocation
Posted by "Xiaoming Gu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiaoming Gu updated HARMONY-6027:
---------------------------------
Component/s: DRLVM
Summary: [drlvm][jit] An undetected interference in graph coloring register allocation (was: [drlvm][jit] An undetected register interference in graph coloring register allocation)
> [drlvm][jit] An undetected interference in graph coloring register allocation
> -----------------------------------------------------------------------------
>
> Key: HARMONY-6027
> URL: https://issues.apache.org/jira/browse/HARMONY-6027
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: IA32 Windows
> Reporter: Xiaoming Gu
>
> When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
> with early_prop
> 0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
> without early_prop
> 0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
> 0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
> After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for the above modification on DH.
> This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6027) [drlvm][jit] An incorrect register
assignment in graph coloring register allocation
Posted by "Xiaoming Gu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiaoming Gu updated HARMONY-6027:
---------------------------------
Summary: [drlvm][jit] An incorrect register assignment in graph coloring register allocation (was: [drlvm][jit] An undetected interference in graph coloring register allocation)
> [drlvm][jit] An incorrect register assignment in graph coloring register allocation
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-6027
> URL: https://issues.apache.org/jira/browse/HARMONY-6027
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: IA32 Windows
> Reporter: Xiaoming Gu
>
> When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
> with early_prop
> 0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
> without early_prop
> 0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
> 0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
> After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for the above modification on DH.
> This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6027) [drlvm][jit] An incorrect register
assignment in graph coloring register allocation
Posted by "Xiaoming Gu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiaoming Gu updated HARMONY-6027:
---------------------------------
Attachment: H6027-V1.patch
> [drlvm][jit] An incorrect register assignment in graph coloring register allocation
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-6027
> URL: https://issues.apache.org/jira/browse/HARMONY-6027
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: IA32 Windows
> Reporter: Xiaoming Gu
> Attachments: H6027-V1.patch
>
>
> When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
> with early_prop
> 0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
> without early_prop
> 0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
> 0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
> After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for the above modification on DH.
> This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6027) [drlvm][jit] An undetected register
interference in graph coloring register allocation
Posted by "Xiaoming Gu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiaoming Gu updated HARMONY-6027:
---------------------------------
Description:
When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
with early_prop
0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
without early_prop
0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for the above modification on DH.
This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
was:
When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
with early_prop
0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
without early_prop
0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for DH modification.
This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
> [drlvm][jit] An undetected register interference in graph coloring register allocation
> --------------------------------------------------------------------------------------
>
> Key: HARMONY-6027
> URL: https://issues.apache.org/jira/browse/HARMONY-6027
> Project: Harmony
> Issue Type: Bug
> Environment: IA32 Windows
> Reporter: Xiaoming Gu
>
> When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
> with early_prop
> 0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
> without early_prop
> 0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
> 0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
> After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for the above modification on DH.
> This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6027) [drlvm][jit] An incorrect register
assignment in graph coloring register allocation
Posted by "Xiaoming Gu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656904#action_12656904 ]
Xiaoming Gu commented on HARMONY-6027:
--------------------------------------
It's correct. Good job. ^_^
> [drlvm][jit] An incorrect register assignment in graph coloring register allocation
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-6027
> URL: https://issues.apache.org/jira/browse/HARMONY-6027
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: IA32 Windows
> Reporter: Xiaoming Gu
> Assignee: Chunrong Lai
> Attachments: H6027-V1.patch
>
>
> When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
> with early_prop
> 0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
> without early_prop
> 0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
> 0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
> After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for the above modification on DH.
> This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-6027) [drlvm][jit] An incorrect register
assignment in graph coloring register allocation
Posted by "Chunrong Lai (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chunrong Lai reassigned HARMONY-6027:
-------------------------------------
Assignee: Chunrong Lai
> [drlvm][jit] An incorrect register assignment in graph coloring register allocation
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-6027
> URL: https://issues.apache.org/jira/browse/HARMONY-6027
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: IA32 Windows
> Reporter: Xiaoming Gu
> Assignee: Chunrong Lai
> Attachments: H6027-V1.patch
>
>
> When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
> with early_prop
> 0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
> without early_prop
> 0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
> 0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
> After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for the above modification on DH.
> This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6027) [drlvm][jit] An undetected
interference in graph coloring register allocation
Posted by "Xiaoming Gu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650152#action_12650152 ]
Xiaoming Gu commented on HARMONY-6027:
--------------------------------------
There is no bug if bin-packing register allocation used for runMultiEncryptDecrypt(). Following are the code:
with early_prop
01FF67E1 I140: MOVSX t166(ECX):I_32,s164(ECX):I_32
without early_prop
01FF6E6B I696: MOV t165(CL):I_8,s164(ECX):I_32
01FF6E6D I140: MOVSX t166(ECX):I_32,t165(CL):I_8
No matter whether with early_prop or not, only ECX is changed. So the bug is gone using bin-packing.
> [drlvm][jit] An undetected interference in graph coloring register allocation
> -----------------------------------------------------------------------------
>
> Key: HARMONY-6027
> URL: https://issues.apache.org/jira/browse/HARMONY-6027
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: IA32 Windows
> Reporter: Xiaoming Gu
>
> When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
> with early_prop
> 0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
> without early_prop
> 0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
> 0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
> After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for the above modification on DH.
> This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6027) [drlvm][jit] An incorrect register
assignment in graph coloring register allocation
Posted by "Chunrong Lai (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12656894#action_12656894 ]
Chunrong Lai commented on HARMONY-6027:
---------------------------------------
Committed in r726970.
Xiaoming, please verify if it is committed as expected.
> [drlvm][jit] An incorrect register assignment in graph coloring register allocation
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-6027
> URL: https://issues.apache.org/jira/browse/HARMONY-6027
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: IA32 Windows
> Reporter: Xiaoming Gu
> Assignee: Chunrong Lai
> Attachments: H6027-V1.patch
>
>
> When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
> with early_prop
> 0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
> without early_prop
> 0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
> 0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
> After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for the above modification on DH.
> This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-6027) [drlvm][jit] An incorrect register
assignment in graph coloring register allocation
Posted by "Xiaoming Gu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651276#action_12651276 ]
Xiaoming Gu commented on HARMONY-6027:
--------------------------------------
With some debugging on graph-coloring RA, I find the bug from register assignment. Following are the details:
Opnd#165 interferes with Opnd#20 which uses EDX. When assigning register to Opnd#165, it doesn't think DH is not available because it forgets to check the size of operands (Opnd#165 is 8-bit and Opnd#20 is 32-bit). Then DH is assigned to Opnd#165 incorrectly.
Maybe the same problem exists in other RA.
> [drlvm][jit] An incorrect register assignment in graph coloring register allocation
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-6027
> URL: https://issues.apache.org/jira/browse/HARMONY-6027
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: IA32 Windows
> Reporter: Xiaoming Gu
>
> When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
> with early_prop
> 0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
> without early_prop
> 0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
> 0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
> After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for the above modification on DH.
> This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-6027) [drlvm][jit] An incorrect register
assignment in graph coloring register allocation
Posted by "Xiaoming Gu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-6027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiaoming Gu updated HARMONY-6027:
---------------------------------
Attachment: H6027-V1.patch
This message is for V1 patch.
A function named occupiedReg() is added in Ia32RegAlloc3.cpp to fix the bug of 8-bit registers - AH, CH, DH and BH - unaligned with 32-bit or 16-bit registers.
Now there are only 4 benchmarks in SPECjvm2008 failed in server_static when early_prop bypassed. But after checking I find they are failed even with early_prop turned on.
(The patch for H6023 is included.)
> [drlvm][jit] An incorrect register assignment in graph coloring register allocation
> -----------------------------------------------------------------------------------
>
> Key: HARMONY-6027
> URL: https://issues.apache.org/jira/browse/HARMONY-6027
> Project: Harmony
> Issue Type: Bug
> Components: DRLVM
> Environment: IA32 Windows
> Reporter: Xiaoming Gu
> Attachments: H6027-V1.patch
>
>
> When running crypto.rsa with early_prop bypassed, a run-time bug happens because of the following code for spec/benchmarks/crypto/rsa/Main.runMultiEncryptDecrypt().
> with early_prop
> 0230D094 I140: MOVSX t166(ESI):I_32,s164(EBX):I_32
> without early_prop
> 0230D0B4 I663: MOV t165(DH):I_8,s164(EBX):I_32
> 0230D0B6 I140: MOVSX t166(ESI):I_32,t165(DH):I_8
> After checking all the code in runMultiEncryptDecrypt(), I find EDX is defined and used several time in this method. With the control flow graph, I think the bug comes from that EDX is changed uncarefully for the above modification on DH.
> This bug is similar to H6016 from the view of early_prop. (https://issues.apache.org/jira/browse/HARMONY-6016) But they trig different bugs.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.