RFR (S): 8000232: NPG: SIGSEGV in Dependencies::DepStream::check_klass_dependency on solaris-x64

Christian Thalinger christian.thalinger at oracle.com
Thu Oct 4 16:39:12 PDT 2012


On Oct 4, 2012, at 4:22 PM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:

> Christian,
> 
> It's technically possible to store NULL in a dependency, but currently most of the callers expect non-null values to be returned.
> 
> Since Dependencies::DepStream::argument is a generic function to work with DepStream, which supports storing NULLs, I was reluctant to require non-null value.

Right.  The change looks good.  -- Chris

> 
> Best regards,
> Vladimir Ivanov
> 
> On 10/5/12 2:48 AM, Christian Thalinger wrote:
>> 
>> On Oct 4, 2012, at 3:04 PM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
>> 
>>> http://cr.openjdk.java.net/~vlivanov/8000232/webrev.00
>>> 22 lines changed: 10 ins; 4 del; 8 mod
>>> 
>>> Context type of a dependency is encoded as NULL only when it is explicit and the context is "default" (see Dependencies::ctxk_encoded_as_null). Decoding takes place only in Dependencies::DepStream::context_type(), however the value is used in other places.
>>> 
>>> The problem is that no decoding is performed when dependencies are logged using Dependencies::write_dependency_to, but only non-NULL values are expected in the code. The bug existed before NPG, it simply didn't cause a crash.
>>> 
>>> Fixed by moving decoding into Dependencies::DepStream::argument, so no caller could see encoded context value (NULL) anymore.
>> 
>> Is this assert still valid then?
>> 
>>    assert(result == NULL || result->is_klass() || result->is_method(), "must be");
>> 
>> -- Chris
>> 
>>> 
>>> It also improves TraceDependencies & LogCompilation output: dependency context is always correctly displayed.
>>> 
>>> Also, did some cleanup.
>>> 
>>> Testing: failing test, JPRT w/ logging turned on & off, CTW on solaris_x64.
>>> 
>>> Best regards,
>>> Vladimir Ivanov
>> 



More information about the hotspot-compiler-dev mailing list