Build fails with "shifting a negative signed value is undefined" on Mac

Ben Evans benjamin.john.evans at gmail.com
Thu Oct 12 12:18:16 UTC 2017


Thanks Tobias.

That fix works for me.

Ben

On Thu, Oct 12, 2017 at 12:55 PM, Tobias Hartmann
<tobias.hartmann at oracle.com> wrote:
> Hi Ben,
>
> thanks for the bug report! This issue has been fixed in JDK 9 by JDK-8152856
> [1] but it seems that we accidentally reintroduced it in the MVT repo. I've
> filed JDK-8189219 [2].
>
> You can use the following as a quick workaround:
>
> diff -r 7dd1c51108a3 src/hotspot/share/opto/library_call.cpp
> --- a/src/hotspot/share/opto/library_call.cpp   Mon Oct 09 13:23:10 2017
> +0200
> +++ b/src/hotspot/share/opto/library_call.cpp   Thu Oct 12 09:21:03 2017
> +0200
> @@ -3896,7 +3896,7 @@
>    }
>    // Now test the correct condition.
>    jint  nval = (obj_array
> -                ? (jint)(Klass::_lh_array_tag_type_value
> +                ? (jint)((juint)Klass::_lh_array_tag_type_value
>                     <<    Klass::_lh_array_tag_shift)
>                  : Klass::_lh_neutral_value);
>    Node* cmp = _gvn.transform(new CmpINode(layout_val, intcon(nval)));
>
> Thanks,
> Tobias
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8152856
> [2] https://bugs.openjdk.java.net/browse/JDK-8189219
>
>
> On 12.10.2017 08:54, Ben Evans wrote:
>>
>> Hi,
>>
>> At changeset:   47322:aa3ca9702304 the build on Mac 10.11.1 configured
>> with
>>
>> ./configure --with-freetype-include=/usr/local/include/freetype2
>> --with-freetype-lib=/usr/local/lib/
>>
>> fails with:
>>
>> === Output from failing command(s) repeated here ===
>> * For target hotspot_variant-server_libjvm_objs_library_call.o:
>>
>> /Users/boxcat/projects/openjdk/valhalla-mvt/src/hotspot/share/opto/library_call.cpp:3900:20:
>> error: shifting a negative signed value is undefined
>> [-Werror,-Wshift-negative-value]
>>                     <<    Klass::_lh_array_tag_shift)
>>                     ^
>> 1 error generated.
>>
>> * All command lines available in
>>
>> /Users/boxcat/projects/openjdk/valhalla-mvt/build/macosx-x86_64-normal-server-release/make-support/failure-logs.
>> === End of repeated output ===
>>
>> I couldn't find a description of how much detail is required for a bug
>> report - hopefully the above is enough, please let me know if more is
>> required or these should be reported in a different way.
>>
>> Thanks,
>>
>> Ben
>>
>


More information about the valhalla-dev mailing list