[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Small ZipFile patch

From: Jeroen Frijters
Subject: RE: Small ZipFile patch
Date: Wed, 5 Mar 2003 01:15:04 +0100

Mono uses a conservative GC, so may be they just don't notice that IRAF
is garbage. On .NET ikvm runs fine:
C:\>ikvm IRAF foo
java.lang.SecurityException: Operation not allowed
        at java.lang.SecurityManager.checkPermission(Unknown Source)
        at java.lang.SecurityManager.checkWrite(Unknown Source)
        at<init>(Unknown Source)
        at<init>(Unknown Source)
        at IRAF.main(Unknown Source)
        at IRAF.main(Unknown Source)
        at Source)
        at IRAF.main(Unknown Source)
        at IRAF.main(Unknown Source)

Another interesting trick with the finalizer is creating instances of
classes that have a private constructor! The attached runtime.j creates
an instance of (a subclass of) java.lang.Runtime. Doesn't work on ikvm,
because it ignores "new" without a corresponding call to the
constructor. It could be considered a bug in Sun's verifier that it
allows a class without a constructor, what do the other VMs do with this


> -----Original Message-----
> From: Mark Wielaard [mailto:address@hidden 
> Sent: Wednesday, March 05, 2003 00:07
> To: Jeroen Frijters
> Cc: address@hidden
> Hi,
> Forgot the most important one for sure:
> $ mono --noinline --share-code bin/ikvm.exe IRAF testfile
> java.lang.SecurityException: Operation not allowed
>         at java.lang.SecurityManager.checkPermission(<unknown>)
>         at java.lang.SecurityManager.checkWrite(<unknown>)
>         at<init>(<unknown>)
>         at<init>(<unknown>)
>         at IRAF.main(<unknown>)
>         at IRAF.main(<unknown>)
> Killed
> Note that it is killed because it rapidly eats up all memory in the
> system.
> Cheers,
> Mark

Attachment: runtime.j
Description: runtime.j

Attachment: runtime.class
Description: runtime.class

reply via email to

[Prev in Thread] Current Thread [Next in Thread]