RFR; 8077420: Build failure with SS12u4

Stefan Karlsson stefan.karlsson at oracle.com
Mon Apr 13 14:01:18 UTC 2015


Hi Lois,

On 2015-04-13 15:58, Lois Foltan wrote:
>
> On 4/13/2015 8:52 AM, Stefan Karlsson wrote:
>> Hi David,
>>
>> On 2015-04-13 14:25, David Holmes wrote:
>>> Hi Stefan,
>>>
>>> On 13/04/2015 9:57 PM, Stefan Karlsson wrote:
>>>> Hi,
>>>>
>>>> Please review this fix for a build failure that was encountered during
>>>> the Solaris Studio compiler upgrade.
>>>
>>> So what was it about the compiler upgrade that exposed this ??
>>
>> I'm not sure, but somehow the function wasn't made available to the 
>> compiler/linker. Maybe there's a combination of the inline keyword 
>> and template functions that used to work, but doesn't anymore? I 
>> don't have access to a SS12u4 setup, so Erik J had to compile with 
>> the patch.
>
> Stefan,
>
> This change looks good.  I believe C++ 5.13 (Solaris Studio 12.4) has 
> made several changes to template definition parsing.  There are 3 
> sections in the new features and functionality documentation of 
> interest.  Particularly the section 1.1.2.5 that discusses how the 
> "template definitions separate" compilation model is now more strict.  
> See http://docs.oracle.com/cd/E37069_01/html/E37075/gnyjb.html#OSSCPgnyiq

Thanks for the review and the link!

StefanK

>
> Thanks,
> Lois
>
>>
>>>
>>>> Two files were missing an include of stack.inline.hpp, which is needed
>>>> to get the definition of default_segment_size(). This function is used
>>>> in the stack.hpp, to provide the default value to the constructor. 
>>>> This
>>>> forces all users of Stacks with the default segment size, to have to
>>>> include stack.inline.hpp. The default_segment_size() implementation
>>>> always evaluates to the same value, given the template parameters, 
>>>> so I
>>>> chose to setup a constant in the header instead of adding the missing
>>>> stack.inline.hpp files.
>>>>
>>>> http://cr.openjdk.java.net/~stefank/8077420/webrev.01/
>>>> https://bugs.openjdk.java.net/browse/JDK-8077420
>>>
>>> This seems okay but I have to say I remain very confused about the 
>>> "right" way to deal with .hpp and .inline.hpp files in general.
>>
>> OK. One rule to honor, as far as possible, is to _not_ use functions 
>> in inline.hpp files from .hpp files. In this case stack.hpp used a 
>> function in stack.inline.hpp.
>>
>> Maybe there's a more authoritative place that describes the "right 
>> way", but I think this post is worth reading and describes it well 
>> enough:
>> http://www.cplusplus.com/forum/articles/10627/
>>
>> Thanks,
>> StefanK
>>
>>>
>>> Thanks,
>>> David
>>>
>>>> Tested with JPRT, and built with SS12u4.
>>>>
>>>> Thanks,
>>>> StefanK
>>
>



More information about the hotspot-dev mailing list