harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov" <alexey.v.varla...@gmail.com>
Subject Re: [drlvm] tests failing on Win2000 PIII
Date Thu, 05 Apr 2007 05:40:59 GMT
2007/4/5, Nathan Beyer <ndbeyer@apache.org>:
> Commenting out the AddVectoredExceptionHandler helped a bit. Here's
> what else (diff below) I had to remove from DRLVM to get "java
> -version" to work. I still can't get a simple HelloWorld class to run,
> even with just the interpreter. I wouldn't be surprised that my little
> hack isn't completely correct.

Nathan, I guess those you needed to remove are for _compiling_ on w2k,
not for simple running pre-build binaries?
At least for the stack_dump.cpp changes, referenced dbghelp.dll is
freely(?) redistributable and you can try run DRLVM with this dll
downloaded or taken from WinXP. If it works, we may need to update
build scripts to include this dll to snapshots as we do with
msvcr71.dll.

>
> Index: port/src/vmem/win/port_vmem.c
> ===================================================================
> --- port/src/vmem/win/port_vmem.c       (revision 525583)
> +++ port/src/vmem/win/port_vmem.c       (working copy)
> @@ -236,12 +236,12 @@
>  }
>
>  APR_DECLARE(size_t) port_vmem_max_size(){
> -    PERFORMANCE_INFORMATION pi;
> -    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> -        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> port_vmem_committed_size();
> -    } else {
> +//    PERFORMANCE_INFORMATION pi;
> +//    if ( GetPerformanceInfo( &pi, sizeof(pi)) ) {
> +//        return (pi.CommitLimit - pi.CommitTotal) * pi.PageSize +
> port_vmem_committed_size();
> +//    } else {
>         return (size_t)0;
> -    }
> +//    }
>  }
>
>  #ifdef __cplusplus
> Index: vmcore/src/stack/stack_dump.cpp
> ===================================================================
> --- vmcore/src/stack/stack_dump.cpp     (revision 525583)
> +++ vmcore/src/stack/stack_dump.cpp     (working copy)
> @@ -85,11 +85,11 @@
>     PSYMBOL_INFO pSymb = (PSYMBOL_INFO)smBuf;
>     pSymb->SizeOfStruct = sizeof(smBuf);
>     pSymb->MaxNameLen = 2048;
> -    DWORD64 funcDispl;
> -    if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl, pSymb)) {
> -        info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) + 1);
> -        strcpy(info->method_name, pSymb->Name);
> -    }
> +    //DWORD64 funcDispl;
> +    //if(SymFromAddr(GetCurrentProcess(), (DWORD64)ip, &funcDispl, pSymb)) {
> +    //    info->method_name = (char*) STD_MALLOC(strlen(pSymb->Name) + 1);
> +    //    strcpy(info->method_name, pSymb->Name);
> +    //}
>     DWORD lineOffset;
>     IMAGEHLP_LINE lineInfo;
>     if (SymGetLineFromAddr(GetCurrentProcess(), (DWORD)ip,
> &lineOffset, &lineInfo)) {
> Index: vmcore/src/util/win/nt_platform_utils.cpp
> ===================================================================
> --- vmcore/src/util/win/nt_platform_utils.cpp   (revision 525583)
> +++ vmcore/src/util/win/nt_platform_utils.cpp   (working copy)
> @@ -60,16 +60,16 @@
>     assert(ok);
>
>     // add VEH to catch NPE's from bytecode
> -    TRACE2("signals", "Adding vectored exception handler...");
> -    veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> -    assert(veh);
> +    // TRACE2("signals", "Adding vectored exception handler...");
> +    // veh = AddVectoredExceptionHandler(0, vectored_exception_handler);
> +    // assert(veh);
>  }
>
>  void shutdown_signals() {
> -    TRACE2("signals", "Removing vectored exception handler...");
> -    ULONG res;
> -    res = RemoveVectoredExceptionHandler(veh);
> -    assert(res);
> +    // TRACE2("signals", "Removing vectored exception handler...");
> +    // ULONG res;
> +    // res = RemoveVectoredExceptionHandler(veh);
> +    // assert(res);
>  } //shutdown_signals
>
>  //The following is for socket error handling
>
>
> -Nathan
>
> On 4/4/07, Gregory Shimansky <gshimansky@gmail.com> wrote:
> > On Friday 02 March 2007 21:56 Geir Magnusson Jr. wrote:
> > > I thought it used to work.  Also, I thought that someone had shown
> > > that Win2k was still widely deployed.  maybe that's win2k+3?  (I can
> > > never keep the windows platform family straight anymore...)
> >
> > Resurrecting this old thread about w2k, Nathan, what happens if you just
> > comment out the line with AddVectoredExceptionHandler? In this case you'll
> > lose a handler registration, so you will not have hardware NPEs (I am not
> > sure about the JIT status for ia32, are hardware NPEs enabled for this
> > architecture?), you won't have JVMTI breakpoints in JIT mode, so debugging
> > won't work. But the rest of VM should work on w2k with the exception of the
> > code which uses P4 specific instructions.
> >
> > If this helps to at least start running the VM, I think it could be possible
> > to move from vectored exceptions to older structured ones on w2k and make it
> > a supported platform.
> >
> > If you get illegal instruction like mfence on w2k as well, probably the
> > modifications which Evgueni Brevnov is going to offer for P3 backport on
> > Linux could help you running at least something...
> >
> > I am asking because I don't have either w2k or P3 processor, so all I can do
> > to help right now is give some suggestions.
> >
> > > geir
> > >
> > > On Feb 26, 2007, at 8:31 PM, Nathan Beyer wrote:
> > > > Thanks for details.
> > > >
> > > > So I guess I'll ask the question again, is there a desire for Win2K
> > > > support? I'm not sure I really have an opinion one way or the other.
> > > > In relation to the previous discussion, I do think we should maintain
> > > > a single code base, so I guess this means either coding to the
> > > > lowest-common spec, some sort of test-and-branch or C macros (?).
> > > >
> > > > I do think it would be helpful to spit out a "OS not supported" error
> > > > condition in these cases.
> > > >
> > > > -Nathan
> > > >
> > > > On 2/26/07, Alex Astapchuk <alex.astapchuk@gmail.com> wrote:
> > > >> Btw, the w2k issue has been raised before. Start of the tread is
> > > >> here:
> > > >>
> > > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > >> 3c44D36A45.802@pobox.com%3e
> > > >>
> > > >> then it turns into 'platform support':
> > > >>
> > > >> http://mail-archives.apache.org/mod_mbox/harmony-dev/200608.mbox/%
> > > >> 3c44D9A4C7.1010607@gmail.com%3e
> > > >>
> > > >> and HARMONY-1145 was filed against the issue.
> > > >>
> > > >> --
> > > >> Thanks,
> > > >>    Alex
> > > >>
> > > >> Alex Astapchuk wrote:
> > > >> > Hi Nathan,
> > > >> >
> > > >> >  > Failed to open JVM DLL:
> > > >> >
> > > >> > C:\bt-trunk\cc\projects\drlvm\trunk\build\win_ia32_msvc_debug
> > > >>
> > > >> \deploy\jdk\jre\bin\default\harmonyvm
> > > >>
> > > >> > DRLVM can not be run on Win2000: it uses 'vectored exception
> > > >> > handler' [1] (instead of old-fashion structured exception handler),
> > > >> > and this feature requires at least WinXP/Win2k3 [2].
> > > >> >
> > > >> > There may be more XP-specific functions I'm not aware about,
but
> > > >> > at least this one will make the loading fail because the loader
> > > >> > can not find AddVectoredExceptionHandler export in kernel32.dll.
> > > >> >
> > > >> > [1] vm\vmcore\src\util\win\nt_platform_utils.cpp
> > > >> >      grep for AddVectoredExceptionHandler around the line 63.
> > > >> >
> > > >> > [2] http://msdn2.microsoft.com/en-us/library/ms679274.aspx
> > > >> >
> > > >> > Requirements
> > > >> > Client Requires Windows Vista or Windows XP.
> > > >> > Server Requires Windows Server "Longhorn" or Windows Server 2003.
> > > >> > Header Declared in Winbase.h; include Windows.h.
> > > >> > Library Use Kernel32.lib.
> > > >> > DLL Requires Kernel32.dll.
> >
> > --
> > Gregory
> >
>

Mime
View raw message