VM fix for booting from a module

Mark Reinhold mr at sun.com
Mon Mar 1 20:53:42 PST 2010


> Date: Mon, 01 Mar 2010 19:13:44 -0800
> From: mandy.chung at sun.com

> I found two issues with the VM change for booting from a module.
> 1. sun.java.launcher.module.boot property added to the system property list but
> the memory is already freed.

Oh my, how embarrassing.  (For me.)

> 2. resource path for the boot module in the bootclasspath was incorrect

Yep.

> Webrev at:
>   http://cr.openjdk.java.net/~mchung/jigsaw/hotspot-boot-fix/
> 
> Apparently, the memory problem caused by (1) only showed up in few linux-i586
> machines but not all.  Surprisingly, it didn't show up on solaris i586,
> windows, and linux-amd64 (at least on the machines I ran the tests).
> 
> Can you review it?

The fix for (1) is obviously correct.

The fix for (2) looks good, except you should use strncpy instead of
strcpy so as to avoid buffer overflows.

- Mark



More information about the jigsaw-dev mailing list