[XS] Change in fuchsia/fuchsia[main]: [build] Do not assume that string_view iterator is const char*

0 views
Skip to first unread message

'Daniel Thornburgh (Gerrit)' via owners-override

unread,
Mar 13, 2024, 3:26:50 PMMar 13
to Owners Override
Attention needed from Ian McKellar and Owners Override

Daniel Thornburgh has uploaded the change for review

Daniel Thornburgh would like Owners Override to review this change.

Commit message

[build] Do not assume that string_view iterator is const char*

A recent libc++ change introduced a wrapper type to explicitly break
this assumption.
Fixed: 328282937
Change-Id: Idd3b1125d41e79664ae088f352457665dae602d2

Change diff

diff --git a/tools/fidl/fidlc/src/json_writer.h b/tools/fidl/fidlc/src/json_writer.h
index 4192dbc..0d9a109 100644
--- a/tools/fidl/fidlc/src/json_writer.h
+++ b/tools/fidl/fidlc/src/json_writer.h
@@ -228,7 +228,7 @@
while (*it != '}') {
++it;
}
- std::string_view codepoint_hex(hex_begin, it - hex_begin);
+ std::string_view codepoint_hex = value.substr(hex_begin - value.begin(), it - hex_begin);
// Next, decode the code point X as an integer.
auto codepoint = decode_unicode_hex(codepoint_hex);
if (codepoint <= 0xffff) {
diff --git a/tools/fidl/fidlc/src/utils.cc b/tools/fidl/fidlc/src/utils.cc
index ed03da7..13e30f0 100644
--- a/tools/fidl/fidlc/src/utils.cc
+++ b/tools/fidl/fidlc/src/utils.cc
@@ -304,7 +304,7 @@

uint32_t decode_unicode_hex(std::string_view str) {
char* endptr;
- unsigned long codepoint = strtoul(str.begin(), &endptr, 16);
+ unsigned long codepoint = strtoul(str.data(), &endptr, 16);
ZX_ASSERT(codepoint != ULONG_MAX);
ZX_ASSERT(endptr == str.end());
return codepoint;

Change information

Files:
  • M tools/fidl/fidlc/src/json_writer.h
  • M tools/fidl/fidlc/src/utils.cc
Change size: XS
Delta: 2 files changed, 2 insertions(+), 2 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • Ian McKellar
  • Owners Override
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Idd3b1125d41e79664ae088f352457665dae602d2
Gerrit-Change-Number: 1005917
Gerrit-PatchSet: 5
Gerrit-Owner: Daniel Thornburgh <dth...@google.com>
Gerrit-Reviewer: Daniel Thornburgh <dth...@google.com>
Gerrit-Reviewer: Ian McKellar <ian...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-CC: Leonard Chan <leona...@google.com>
Gerrit-CC: Roland McGrath <mcgr...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Ian McKellar <ian...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/17c6c6c1215e8eb63e9dea985ba3140afcd30440-HTML%40fuchsia-review.googlesource.com.
unsatisfied_requirement
open
diffy

'Adam Barth (Gerrit)' via owners-override

unread,
Mar 13, 2024, 5:06:50 PMMar 13
to Daniel Thornburgh, Owners Override, Leonard Chan, Roland McGrath, Tricium, Ian McKellar, CQ Bot
Attention needed from Daniel Thornburgh, Ian McKellar and Owners Override

Adam Barth voted Code-Review+2

Code-Review+2
Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Thornburgh
  • Ian McKellar
  • Owners Override
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Idd3b1125d41e79664ae088f352457665dae602d2
Gerrit-Change-Number: 1005917
Gerrit-PatchSet: 5
Gerrit-Owner: Daniel Thornburgh <dth...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Reviewer: Daniel Thornburgh <dth...@google.com>
Gerrit-Reviewer: Ian McKellar <ian...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-CC: Leonard Chan <leona...@google.com>
Gerrit-CC: Roland McGrath <mcgr...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Daniel Thornburgh <dth...@google.com>
Gerrit-Attention: Ian McKellar <ian...@google.com>
Gerrit-Comment-Date: Wed, 13 Mar 2024 21:06:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/de42635ac220d7207a981db07c649a8bd9ef0132-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'Mitchell Kember (Gerrit)' via owners-override

unread,
Mar 13, 2024, 5:15:23 PMMar 13
to Daniel Thornburgh, Adam Barth, Owners Override, Leonard Chan, Roland McGrath, Tricium, Ian McKellar, CQ Bot
Attention needed from Daniel Thornburgh, Ian McKellar and Owners Override

Mitchell Kember voted Code-Review+2

Code-Review+2
Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Thornburgh
  • Ian McKellar
  • Owners Override
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Idd3b1125d41e79664ae088f352457665dae602d2
Gerrit-Change-Number: 1005917
Gerrit-PatchSet: 5
Gerrit-Owner: Daniel Thornburgh <dth...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Reviewer: Daniel Thornburgh <dth...@google.com>
Gerrit-Reviewer: Ian McKellar <ian...@google.com>
Gerrit-Reviewer: Mitchell Kember <mke...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-CC: Leonard Chan <leona...@google.com>
Gerrit-CC: Roland McGrath <mcgr...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Daniel Thornburgh <dth...@google.com>
Gerrit-Attention: Ian McKellar <ian...@google.com>
Gerrit-Comment-Date: Wed, 13 Mar 2024 21:15:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/21d05b768d08767ca0c2cc9d55010540672bfb6f-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'Daniel Thornburgh (Gerrit)' via owners-override

unread,
Mar 13, 2024, 5:33:02 PMMar 13
to Mitchell Kember, Adam Barth, Owners Override, Leonard Chan, Roland McGrath, Tricium, Ian McKellar, CQ Bot
Attention needed from Ian McKellar, Leonard Chan and Owners Override

Daniel Thornburgh voted and added 1 comment

Votes added by Daniel Thornburgh

Commit-Queue+2

1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Leonard Chan . resolved

*ping* on this

Daniel Thornburgh

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Ian McKellar
  • Leonard Chan
  • Owners Override
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Idd3b1125d41e79664ae088f352457665dae602d2
Gerrit-Change-Number: 1005917
Gerrit-PatchSet: 5
Gerrit-Owner: Daniel Thornburgh <dth...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Reviewer: Daniel Thornburgh <dth...@google.com>
Gerrit-Reviewer: Ian McKellar <ian...@google.com>
Gerrit-Reviewer: Mitchell Kember <mke...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-CC: Leonard Chan <leona...@google.com>
Gerrit-CC: Roland McGrath <mcgr...@google.com>
Gerrit-Attention: Leonard Chan <leona...@google.com>
Gerrit-Attention: Owners Override <owners-...@fuchsia.dev>
Gerrit-Attention: Ian McKellar <ian...@google.com>
Gerrit-Comment-Date: Wed, 13 Mar 2024 21:32:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Leonard Chan <leona...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/6debe2ecc3a47abae6f128c96239c1dbf1e479c7-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy

'CQ Bot (Gerrit)' via owners-override

unread,
Mar 13, 2024, 7:43:29 PMMar 13
to Daniel Thornburgh, Mitchell Kember, Adam Barth, Owners Override, Leonard Chan, Roland McGrath, Tricium, Ian McKellar

CQ Bot submitted the change

Change information

Commit message:
[build] Do not assume that string_view iterator is const char*

A recent libc++ change introduced a wrapper type to explicitly break
this assumption.
Fixed: 328282937
Change-Id: Idd3b1125d41e79664ae088f352457665dae602d2
Reviewed-by: Adam Barth <aba...@google.com>
Reviewed-by: Mitchell Kember <mke...@google.com>
Commit-Queue: Daniel Thornburgh <dth...@google.com>
Files:
  • M tools/fidl/fidlc/src/json_writer.h
  • M tools/fidl/fidlc/src/utils.cc
Change size: XS
Delta: 2 files changed, 2 insertions(+), 2 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Adam Barth, +2 by Mitchell Kember
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Idd3b1125d41e79664ae088f352457665dae602d2
Gerrit-Change-Number: 1005917
Gerrit-PatchSet: 6
Gerrit-Owner: Daniel Thornburgh <dth...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Reviewer: Daniel Thornburgh <dth...@google.com>
Gerrit-Reviewer: Ian McKellar <ian...@google.com>
Gerrit-Reviewer: Mitchell Kember <mke...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-CC: Leonard Chan <leona...@google.com>
Gerrit-CC: Roland McGrath <mcgr...@google.com>

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/8ee219378d56a039da3a71de7c4a06405e0163dd-HTML%40fuchsia-review.googlesource.com.
open
diffy
satisfied_requirement

'GI Roller (Gerrit)' via owners-override

unread,
Mar 13, 2024, 7:46:38 PMMar 13
to Daniel Thornburgh, CQ Bot, Mitchell Kember, Adam Barth, Owners Override, Leonard Chan, Roland McGrath, Tricium, Ian McKellar

Message from GI Roller

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: fuchsia
Gerrit-Branch: main
Gerrit-Change-Id: Idd3b1125d41e79664ae088f352457665dae602d2
Gerrit-Change-Number: 1005917
Gerrit-PatchSet: 6
Gerrit-Owner: Daniel Thornburgh <dth...@google.com>
Gerrit-Reviewer: Adam Barth <aba...@google.com>
Gerrit-Reviewer: Daniel Thornburgh <dth...@google.com>
Gerrit-Reviewer: Ian McKellar <ian...@google.com>
Gerrit-Reviewer: Mitchell Kember <mke...@google.com>
Gerrit-Reviewer: Owners Override <owners-...@fuchsia.dev>
Gerrit-CC: Leonard Chan <leona...@google.com>
Gerrit-CC: Roland McGrath <mcgr...@google.com>
Gerrit-Comment-Date: Wed, 13 Mar 2024 23:46:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No

--
You received this message because you are subscribed to the Google Groups "owners-override" group.
To unsubscribe from this group and stop receiving emails from it, send an email to owners-overri...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/owners-override/fd2c99d2f7e690a735027cc0fe1cad3b4807417b-EmailReviewComments-HTML%40fuchsia-review.googlesource.com.
satisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages