harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2073) [drlvm][unit] org.apache.harmony.beans.tests.java.beans.PersistenceDelegateTest crashes DRLVM
Date Tue, 07 Nov 2006 15:06:52 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-2073?page=comments#action_12447820 ] 
            
Alexei Zakharov commented on HARMONY-2073:
------------------------------------------

I've created a smaller test to reproduce the problem using the debug build on Win:

CircularRedundancyTest.java:
---
import java.beans.*;
import junit.framework.TestCase;

public class CircularRedundancyTest extends TestCase {
    
    public void testStackOverflow() {
        Encoder enc = new Encoder();
        DummyPersistenceDelegate pd = new DummyPersistenceDelegate();
        
        enc.setPersistenceDelegate(Object.class, pd);
        pd.initialize(Object2.class, new Object2(), new Object2(), enc);
    }

    static class DummyPersistenceDelegate extends PersistenceDelegate {
        public Expression instantiate(Object oldInstance, Encoder out) {
            return new Expression(oldInstance.getClass(), "new", null);
        }

        public void initialize(Class<?> type, Object oldInstance,
                Object newInstance, Encoder enc) {
            super.initialize(type, oldInstance, newInstance, enc);
        }
    }
    
    static class Object2 extends Object {}
}
---

reproduce-hy2073.bat:
---
@echo off
set VM_HOME=C:\Java\harmony\enhanced\drlvm\trunk\build\win_ia32_msvc_debug\deploy\jre
REM set VM_HOME=C:\Java\harmony\enhanced\drlvm\trunk\build\win_ia32_msvc_release\deploy\jre
set BUILD_DIR=C:\mydoc\projects\harmony-beans\build
set ANT_LIB=C:\Java\apache-ant-1.6.5\lib
set FORMATTER=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter
set REPORT_FILE=testReport.txt

%VM_HOME%\bin\java.exe -Xbootclasspath/p:%BUILD_DIR%\classes -classpath %BUILD_DIR%\tests;%ANT_LIB%\junit.jar;%ANT_LIB%\ant-launcher.jar;%ANT_LIB%\ant.jar;%ANT_LIB%\ant-junit.jar
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner CircularRedundancyTest formatter=%FORMATTER%,%REPORT_FILE%
type %REPORT_FILE%
---

No output means VM crash. If I run this directly using junit.textui.TestRunner the test passes.

Have fun.

> [drlvm][unit] org.apache.harmony.beans.tests.java.beans.PersistenceDelegateTest crashes
DRLVM
> ---------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2073
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2073
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: SUSE Linux Enterprise Desktop 10 (i586)
> VERSION = 10
>            Reporter: Alexei Fedotov
>
> $ drlvm/trunk/build/lnx_ia32_gcc_debug/deploy/jre/bin/java -Xbootclasspath/a:/nfs/site/proj/drl/mrt/users/af/bin/cruisecontrol-bin-2.4.1/lib/junit.jar:classlib/trunk/modules/beans/bin/test:classlib/trunk/modules/beans/bin/test_support
junit.textui.TestRunner org.apache.harmony.beans.tests.java.beans.PersistenceDelegateTest
> ..class java.lang.NullPointerException: newInstance is null
> ........java: /nfs/site/proj/drl/mrt/users/af/ws/1/drlvm/trunk/vm/vmcore/src/exception/exceptions_impl.cpp:384:
void exn_raise_by_name_internal(const char*, const char*, _jobject*): Assertion `hythread_is_suspend_enabled()'
failed.
> SIGABRT in VM code.
> SIGSEGV in VM code.
> Stack trace:
> [vm hangs]
> See http://wiki.apache.org/harmony/Unit_Tests_Pass_on_DRLVM

-- 
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

        

Mime
View raw message