[RFH]: 8186443: Missing stdint.h for zero builds

Kim Barrett kim.barrett at oracle.com
Fri Aug 18 23:54:46 UTC 2017


> On Aug 18, 2017, at 6:49 PM, John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de> wrote:
> 
> Hi!
> 
> On 08/19/2017 12:35 AM, David Holmes wrote:
>> There is a bug in the test file:
>> 
>> test/native/runtime/test_vmStructs.cpp
>> 
>> #include "precompiled.hpp"
>> #include "runtime/vmStructs.hpp"
>> #include "utilities/macros.hpp"
>> #include "unittest.hpp"
>> 
>> #if INCLUDE_VM_STRUCTS
>> 
>> If we aren't including VM structs then we probably shouldn't be #include'ing vmStructs.hpp!
>> 
>> The #include needs to move inside the guard.
> 
> That didn't help, unfortunately. Still fails with the same problem :(.
> 
> Adrian
> 
> -- 
> .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer - glaubitz at debian.org
> `. `'   Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
>  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Presumably that means INCLUDE_VM_STRUCTS is true.

The include should still be moved inside the conditional guard.  But I think the
problem is indeed with vmStructs.hpp itself.

vmStructs.hpp has this for #includes:

#include "utilities/debug.hpp"
#ifdef COMPILER1
#include "c1/c1_Runtime1.hpp"
#endif

debug.hpp was recently changed to have fairly minimal #includes.  In
particular, it no longer #includes globalDefinitions.hpp, which is
where most of our code gets <stdint.h> and the like from.

I think zero doesn't define COMPILER1; zero only uses the interpreter,
not any of the compilers.

So for zero, it used to get <stdint.h> indirectly from
globalDefinitions.hpp via debug.hpp, but no longer does.  And when
COMPILER1 is defined (which it normally is, except for zero), I bet
there's an indirect include of globalDefinitions.hpp from there.

I think adding an #include of <stdint.h> to vmStructs.hpp is
reasonable.  Alternatively, #include globalDefinitions.hpp, though I'm
personally not a fan of that file.



More information about the hotspot-dev mailing list