Error: shifting a negative signed value is undefined

62 views
Skip to first unread message

ClearScript Developers

unread,
Sep 18, 2023, 2:06:55 PM9/18/23
to v8-dev
Hello V8 folks!

We're seeing this error in 11.8 Linux builds:

../../../src/maglev/maglev-ir.cc:2033:43: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
 2033 |                       ((kIsDoubleBit - 2) << (kTaggedSizeLog2 - 1)));
      |                        ~~~~~~~~~~~~~~~~~~ ^
../../../src/maglev/maglev-ir.cc:2100:35: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
 2100 |               ((kIsDoubleBit - 2) << (kTaggedSizeLog2 - 1)));
      |                ~~~~~~~~~~~~~~~~~~ ^

It's easy enough to suppress via "-Wno-shift-negative-value", but is that safe?

Thanks!

Jakob Linke

unread,
Sep 19, 2023, 1:36:32 AM9/19/23
to v8-...@googlegroups.com, Leszek Swirski

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/48f0992d-28a5-430b-a1e2-cd5dd4df0c95n%40googlegroups.com.

Marja Hölttä

unread,
Sep 19, 2023, 2:21:26 AM9/19/23
to v8-...@googlegroups.com, Leszek Swirski



--

Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Liana Sebastian.

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

    

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.


v8-dev

unread,
Sep 19, 2023, 9:55:50 AM9/19/23
to v8-dev
Thanks, Marja. Do you know if this fix will eventually appear on the 11.8 branch?

Marja Hölttä

unread,
Sep 19, 2023, 12:17:31 PM9/19/23
to v8-...@googlegroups.com
It's in 11.9 and I'm guessing it won't be merged back to 11.8. We generally backmerge fixes which are important for the main embedder, Chromium, and this one isn't. We also don't maintain separate version-X branches for Chromium and other embedders.

Happy to be wrong though.


ClearScript Developers

unread,
Sep 19, 2023, 2:20:18 PM9/19/23
to v8-dev
Thanks again, Marja. We'll cherry pick it :)
Reply all
Reply to author
Forward
0 new messages