-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v8: unnecessary call to icu::toUCharPtr requires ICU 58+ #19656
Comments
Might be worked around by including the backported |
- char16ptr.h is appended to the ICU 57 unistr.h - this way, no v8 code change is needed. Fixes: nodejs#19656
From your description of the issue, it sounds like V8 is the right place to fix this? |
@bnoordhuis I now think so, per #19658 (comment) for v8, what is needed here is either (1) fixing the call sites to stop using the unneeded casts or (2) including the backported char16ptr.h header. Both of these are small changes. |
I can look into (1) probably tomorrow. |
Remove a call to `icu::toUCharPtr()` that wasn't present in other similar looking call sites either, just reinterpret_cast directly. Fixes nodejs/node#19656. Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: If281ce0a39356aa8bd20efb24c3e4b52b06841a3 Reviewed-on: https://chromium-review.googlesource.com/987953 Reviewed-by: Daniel Ehrenberg <[email protected]> Commit-Queue: Ben Noordhuis <[email protected]> Cr-Commit-Position: refs/heads/master@{#52311}
Original commit message: [intl] unbreak build with ICU 57 Remove a call to `icu::toUCharPtr()` that wasn't present in other similar looking call sites either, just reinterpret_cast directly. Fixes nodejs#19656. Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: If281ce0a39356aa8bd20efb24c3e4b52b06841a3 Reviewed-on: https://chromium-review.googlesource.com/987953 Reviewed-by: Daniel Ehrenberg <[email protected]> Commit-Queue: Ben Noordhuis <[email protected]> Cr-Commit-Position: refs/heads/master@{nodejs#52311} Fixes: nodejs#19656
Is there any reason to use earlier ICU? I'm asking also for future reference. I don't think V8 is expected to work with arbitrary ICU versions, as that's not what we test. |
It's not but this specific patch makes it work again with the system ICU on recent Ubuntu releases. That seemed worthwhile enough for a one-liner. |
@hashseed No there is not a reason to use an earlier ICU usually. But in this case it was a regression introduced by v8/v8@99e8963 which just had an unneeded cast - there's also no reason to restrict earlier ICUs (especially when they are in active use) for non-feature/bugfix code. |
Original commit message: [intl] unbreak build with ICU 57 Remove a call to `icu::toUCharPtr()` that wasn't present in other similar looking call sites either, just reinterpret_cast directly. Fixes #19656. Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: If281ce0a39356aa8bd20efb24c3e4b52b06841a3 Reviewed-on: https://chromium-review.googlesource.com/987953 Reviewed-by: Daniel Ehrenberg <[email protected]> Commit-Queue: Ben Noordhuis <[email protected]> Cr-Commit-Position: refs/heads/master@{#52311} PR-URL: #19710 Fixes: #19656 Refs: v8/v8@b767cde Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Original commit message: [intl] unbreak build with ICU 57 Remove a call to `icu::toUCharPtr()` that wasn't present in other similar looking call sites either, just reinterpret_cast directly. Fixes nodejs#19656. Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: If281ce0a39356aa8bd20efb24c3e4b52b06841a3 Reviewed-on: https://chromium-review.googlesource.com/987953 Reviewed-by: Daniel Ehrenberg <[email protected]> Commit-Queue: Ben Noordhuis <[email protected]> Cr-Commit-Position: refs/heads/master@{nodejs#52311} PR-URL: nodejs#19710 Fixes: nodejs#19656 Refs: v8/v8@b767cde Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Original commit message: [intl] unbreak build with ICU 57 Remove a call to `icu::toUCharPtr()` that wasn't present in other similar looking call sites either, just reinterpret_cast directly. Fixes #19656. Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: If281ce0a39356aa8bd20efb24c3e4b52b06841a3 Reviewed-on: https://chromium-review.googlesource.com/987953 Reviewed-by: Daniel Ehrenberg <[email protected]> Commit-Queue: Ben Noordhuis <[email protected]> Cr-Commit-Position: refs/heads/master@{#52311} PR-URL: #19710 Fixes: #19656 Refs: v8/v8@b767cde Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: James M Snell <[email protected]> PR-URL: #19980 Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Yang Guo <[email protected]>
Original commit message: [intl] unbreak build with ICU 57 Remove a call to `icu::toUCharPtr()` that wasn't present in other similar looking call sites either, just reinterpret_cast directly. Fixes #19656. Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: If281ce0a39356aa8bd20efb24c3e4b52b06841a3 Reviewed-on: https://chromium-review.googlesource.com/987953 Reviewed-by: Daniel Ehrenberg <[email protected]> Commit-Queue: Ben Noordhuis <[email protected]> Cr-Commit-Position: refs/heads/master@{#52311} PR-URL: #19710 Fixes: #19656 Refs: v8/v8@b767cde Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: James M Snell <[email protected]> PR-URL: #19980 Reviewed-By: Ali Ijaz Sheikh <[email protected]> Reviewed-By: Yang Guo <[email protected]>
Original commit message: [intl] unbreak build with ICU 57 Remove a call to `icu::toUCharPtr()` that wasn't present in other similar looking call sites either, just reinterpret_cast directly. Fixes #19656. Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: If281ce0a39356aa8bd20efb24c3e4b52b06841a3 Reviewed-on: https://chromium-review.googlesource.com/987953 Reviewed-by: Daniel Ehrenberg <[email protected]> Commit-Queue: Ben Noordhuis <[email protected]> Cr-Commit-Position: refs/heads/master@{#52311} PR-URL: #19710 Fixes: #19656 Refs: v8/v8@b767cde Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Original commit message: [intl] unbreak build with ICU 57 Remove a call to `icu::toUCharPtr()` that wasn't present in other similar looking call sites either, just reinterpret_cast directly. Fixes #19656. Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: If281ce0a39356aa8bd20efb24c3e4b52b06841a3 Reviewed-on: https://chromium-review.googlesource.com/987953 Reviewed-by: Daniel Ehrenberg <[email protected]> Commit-Queue: Ben Noordhuis <[email protected]> Cr-Commit-Position: refs/heads/master@{#52311} PR-URL: #19710 Fixes: #19656 Refs: v8/v8@b767cde Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Original commit message: [intl] unbreak build with ICU 57 Remove a call to `icu::toUCharPtr()` that wasn't present in other similar looking call sites either, just reinterpret_cast directly. Fixes #19656. Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: If281ce0a39356aa8bd20efb24c3e4b52b06841a3 Reviewed-on: https://chromium-review.googlesource.com/987953 Reviewed-by: Daniel Ehrenberg <[email protected]> Commit-Queue: Ben Noordhuis <[email protected]> Cr-Commit-Position: refs/heads/master@{#52311} PR-URL: #19710 Fixes: #19656 Refs: v8/v8@b767cde Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Steven R Loomis <[email protected]> Reviewed-By: James M Snell <[email protected]>
Split off from #19151
I found an issue in v8 which I worked around at srl295@384ab7d - introduced into v8 at v8/v8@99e8963 (and into node later) - there is a call to
icu::toUCharPtr()
passed as an input to areinterpret_cast
. This seems to unnecessarily tie the code to ICU 59+, and in any event ICU useschar16_t
and notUChar
as the type for C++ going forward. SotoUCharPtr()
is not something to call going forward. Background hereIf this were fixed, ICU4C 57 ought to be supported by master at this point.
The text was updated successfully, but these errors were encountered: