Fwd: Compile fix for Ubuntu 11.04

Igor Veresov igor.veresov at oracle.com
Tue May 10 11:18:04 PDT 2011


Andrew, I already knew about this problem, Tony noticed that. Apparently 
newer gcc produces a warning that when you have an argument suppression 
in sscanf you can't use a length modifier. I'll fix that today.

igor

On 5/10/11 8:48 AM, Andrew Haley wrote:
> On 05/10/2011 04:37 PM, Azeem Jiva wrote:
>> Sorry sent this to the wrong alias before.
>>
>> -------- Original Message --------
>> Subject: 	Compile fix for Ubuntu 11.04
>> Date: 	Tue, 10 May 2011 10:32:42 -0500
>> From: 	Azeem Jiva<azeem.jiva at oracle.com>
>> Organization: 	Oracle
>> To: 	hotspot-dev at openjdk.java.net
>>
>>
>>
>> I have a change that allows GCC 4.5.2 on Ubuntu 11.04 to properly
>> compile the HotSpot JVM.   I've attached a diff below:
>>
>>
>>      src/os/linux/vm/os_linux.cpp
>>
>> ------------------------------------------------------------------------
>>
>> @@ -2848,11 +2848,11 @@
>>        if (fp) {
>>          while (!feof(fp)) {
>>            char chars[257];
>>            long x = 0;
>>            if (fgets(chars, sizeof(chars), fp)) {
>> -          if (sscanf(chars, "%lx-%*lx",&x) == 1
>> +          if (sscanf(chars, "%lx-%*x",&x) == 1
>>                  &&    x == (long)p) {
>>                if (strstr (chars, "hugepage")) {
>>                  result = true;
>>                  break;
>>                }
>>
>
> What does this bug fix do?
>
> Andrew.



More information about the hotspot-compiler-dev mailing list