[LLVMdev] [VMKit] Bug in J3 User.Name detection

marcus marcus at mh-development.info
Fri Jun 10 05:20:29 PDT 2011


 Hello List,

 I'm currently trying to compile VMKit for the L4 Operating System and 
 the L4Re Runtime environment for my student project.
 While doing so I stumbled upon a bug in the implementation of 
 lib/J3/Classpath/ClasspathVMSystemProperties.inc

 The current version first tries to get the username by checking the 
 LOGNAME environment variable. If this is NULL it then checks


 tmp = getenv("USERNAME");
   if (!tmp) tmp = getenv("LOGNAME");
   else if (!tmp) tmp = getenv("NAME");
   else if (!tmp) tmp = "";
   setProperty(vm, prop, "user.



 diff a/ClasspathVMSystemProperties.inc 
 b/ClasspathVMSystemProperties.inc
 118,119c118,119
 <   else if (!tmp) tmp = getenv("NAME");
 <   else if (!tmp) tmp = "";
 ---
>   if (!tmp) tmp = getenv("NAME");
>   if (!tmp) tmp = "";




More information about the llvm-dev mailing list