harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@gmail.com>
Subject Re: [drlvm] tests failing on Win2000 PIII
Date Thu, 05 Apr 2007 12:14:47 GMT
Alexey Varlamov wrote:
> 2007/4/5, Gregory Shimansky <gshimansky@gmail.com>:
>> 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.
> 
> I'd also suggest straightforward solution: test Windows version at
> startup and either setup VEH on modern OSes or export special JNI
> table of SEH-wrapped functions on w2k. This way we'll have the same
> feature set on all flavours of Windows and no compromise to
> performance.

This is a good idea except that not all VM functions are called through 
JNI. The invocation API functions JNI_GetDefaultJavaVMInitArgs, 
JNI_GetCreatedJavaVMs and JNI_CreateJavaVM are exported by harmonyvm.dll 
directly. At least JNI_CreateJavaVM should execute Java code (classlib 
startup) with SEH/VEH protection to catch hardware NPEs and other 
possible exceptions in managed code.

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


-- 
Gregory


Mime
View raw message