RFR: Fix build failure due to uninitialized variable

Zhengyu Gu zgu at redhat.com
Tue Jul 17 18:24:27 UTC 2018



On 07/17/2018 02:18 PM, Aleksey Shipilev wrote:
> On 07/17/2018 08:15 PM, Zhengyu Gu wrote:
>> Fix build failure due to uninitialized variable.
>>
>> Webrev: http://cr.openjdk.java.net/~zgu/shenandoah/fix_uninit/webrev.00/
> 
> Looks good. Does "NULL" fit here too, instead of oop initialization?
Yep, also work:

@ -132,7 +132,7 @@
        return NULL;
      }

-    oop obj;
+    oop obj = NULL;
      if (pop_candidate(obj)) {
        assert(ShenandoahStringDedup::is_candidate(obj), "Must be a 
candidate");
        return obj;

Okay?

Thanks,

-Zhengyu

> 
> -Aleksey
> 


More information about the shenandoah-dev mailing list