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 Pervov (JIRA)" <ji...@apache.org> on 2006/10/30 16:53:22 UTC

[jira] Created: (HARMONY-2010) [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set

[drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set
------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2010
                 URL: http://issues.apache.org/jira/browse/HARMONY-2010
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: ia32, msvc 2003, debug
            Reporter: Pavel Pervov


When hardware exception (like access violation) occurs in code where direction flag is set (after 'std' instruction), exception handler will fall into infinite recursion eventually finishing VM without any output.

The example of such code is implementation of memcpy in Microsoft Visual C++:
-excerpt begin-
    std
    rep movsd
    cld
-excerpt end-

Possible solution would be to wrap exception handler into a code which will save flags, clear direction flag, and then execute the handler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2010) [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2010?page=all ]

Ilya Berezhniuk updated HARMONY-2010:
-------------------------------------

    Attachment: exception_wrapper.patch

Suggested patch fixes described problem.

> [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2010
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2010
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: ia32, msvc 2003, debug
>            Reporter: Pavel Pervov
>         Attachments: exception_wrapper.patch, memcpy.zip
>
>
> When hardware exception (like access violation) occurs in code where direction flag is set (after 'std' instruction), exception handler will fall into infinite recursion eventually finishing VM without any output.
> The example of such code is implementation of memcpy in Microsoft Visual C++:
> -excerpt begin-
>     std
>     rep movsd
>     cld
> -excerpt end-
> Possible solution would be to wrap exception handler into a code which will save flags, clear direction flag, and then execute the handler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2010) [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2010?page=comments#action_12447872 ] 
            
Gregory Shimansky commented on HARMONY-2010:
--------------------------------------------

With this patch a kernel test java.lang.RuntimeTest2 now fails with the following message on WinXP:

     [echo] RUNNING : java.lang.RuntimeTest2
    [junit] Uncaught exception in Thread-shutdown:
    [junit] java.lang.InternalError: Thread Manager internal error 720006
    [junit]     at java.lang.Object.notifyAll(Unknown Source)
    [junit]     at java.lang.FinalizerThread.wakeupFinalization(Unknown Source)
    [junit]     at java.lang.FinalizerThread.startFinalization(Unknown Source)
    [junit]     at java.lang.FinalizerThread.doFinalizationOnExit(Unknown Source)
    [junit]     at java.lang.FinalizerThread.shutdown(Unknown Source)
    [junit]     at java.lang.VMStart$DefaultShutDownHook.run(Unknown Source)

Without this patch this test passes.

> [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2010
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2010
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: ia32, msvc 2003, debug
>            Reporter: Pavel Pervov
>         Assigned To: Gregory Shimansky
>         Attachments: exception_wrapper.patch, memcpy.zip
>
>
> When hardware exception (like access violation) occurs in code where direction flag is set (after 'std' instruction), exception handler will fall into infinite recursion eventually finishing VM without any output.
> The example of such code is implementation of memcpy in Microsoft Visual C++:
> -excerpt begin-
>     std
>     rep movsd
>     cld
> -excerpt end-
> Possible solution would be to wrap exception handler into a code which will save flags, clear direction flag, and then execute the handler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-2010) [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2010?page=all ]

Gregory Shimansky reassigned HARMONY-2010:
------------------------------------------

    Assignee: Gregory Shimansky

> [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2010
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2010
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: ia32, msvc 2003, debug
>            Reporter: Pavel Pervov
>         Assigned To: Gregory Shimansky
>         Attachments: exception_wrapper.patch, memcpy.zip
>
>
> When hardware exception (like access violation) occurs in code where direction flag is set (after 'std' instruction), exception handler will fall into infinite recursion eventually finishing VM without any output.
> The example of such code is implementation of memcpy in Microsoft Visual C++:
> -excerpt begin-
>     std
>     rep movsd
>     cld
> -excerpt end-
> Possible solution would be to wrap exception handler into a code which will save flags, clear direction flag, and then execute the handler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (HARMONY-2010) [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2010?page=comments#action_12447876 ] 
            
Gregory Shimansky commented on HARMONY-2010:
--------------------------------------------

Hmm no, without this patch this test sometimes fails as well :(

> [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2010
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2010
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: ia32, msvc 2003, debug
>            Reporter: Pavel Pervov
>         Assigned To: Gregory Shimansky
>         Attachments: exception_wrapper.patch, memcpy.zip
>
>
> When hardware exception (like access violation) occurs in code where direction flag is set (after 'std' instruction), exception handler will fall into infinite recursion eventually finishing VM without any output.
> The example of such code is implementation of memcpy in Microsoft Visual C++:
> -excerpt begin-
>     std
>     rep movsd
>     cld
> -excerpt end-
> Possible solution would be to wrap exception handler into a code which will save flags, clear direction flag, and then execute the handler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2010) [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2010?page=all ]

Pavel Pervov updated HARMONY-2010:
----------------------------------

    Patch Info: [Patch Available]

> [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2010
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2010
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: ia32, msvc 2003, debug
>            Reporter: Pavel Pervov
>         Attachments: exception_wrapper.patch, memcpy.zip
>
>
> When hardware exception (like access violation) occurs in code where direction flag is set (after 'std' instruction), exception handler will fall into infinite recursion eventually finishing VM without any output.
> The example of such code is implementation of memcpy in Microsoft Visual C++:
> -excerpt begin-
>     std
>     rep movsd
>     cld
> -excerpt end-
> Possible solution would be to wrap exception handler into a code which will save flags, clear direction flag, and then execute the handler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2010) [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2010?page=all ]

Pavel Pervov updated HARMONY-2010:
----------------------------------

    Attachment: memcpy.zip

Test to reproduce the failure.

To build:
1) javac Memcpy.java
2) cl -LD -I <path to JDK/include> Memcpy.cpp

To test:
<java> Memcpy

RIs generate crash reports, but DRLVM finishes silently.

> [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2010
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2010
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: ia32, msvc 2003, debug
>            Reporter: Pavel Pervov
>         Attachments: memcpy.zip
>
>
> When hardware exception (like access violation) occurs in code where direction flag is set (after 'std' instruction), exception handler will fall into infinite recursion eventually finishing VM without any output.
> The example of such code is implementation of memcpy in Microsoft Visual C++:
> -excerpt begin-
>     std
>     rep movsd
>     cld
> -excerpt end-
> Possible solution would be to wrap exception handler into a code which will save flags, clear direction flag, and then execute the handler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (HARMONY-2010) [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2010?page=all ]

Gregory Shimansky resolved HARMONY-2010.
----------------------------------------

    Resolution: Fixed

Patch applied at revision 472215. Please check that it was applied as expected.

> [drlvm] Infinite recursion in vectored exception handler in debug VM in hardware exception with direction flag set
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2010
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2010
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: ia32, msvc 2003, debug
>            Reporter: Pavel Pervov
>         Assigned To: Gregory Shimansky
>         Attachments: exception_wrapper.patch, memcpy.zip
>
>
> When hardware exception (like access violation) occurs in code where direction flag is set (after 'std' instruction), exception handler will fall into infinite recursion eventually finishing VM without any output.
> The example of such code is implementation of memcpy in Microsoft Visual C++:
> -excerpt begin-
>     std
>     rep movsd
>     cld
> -excerpt end-
> Possible solution would be to wrap exception handler into a code which will save flags, clear direction flag, and then execute the handler.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira