Skip to content

Commit

Permalink
url: Work around Clang miscompile on mips64el
Browse files Browse the repository at this point in the history
  • Loading branch information
klzgrad committed Mar 24, 2024
1 parent b463afe commit 374334c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/url/url_canon_ip.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ CanonHostInfo::Family DoIPv4AddressToNumber(const CHAR* spec,
while (true) {
// If this is not the first character of a component, go to the next
// component.
if (current_position != host.begin && spec[current_position - 1] != '.') {
// XXX: On mips64el, using
// `current_position != host.begin && spec[current_position - 1] != '.'`
// would have current_position going to the negative.
if (current_position > host.begin && spec[current_position - 1] != '.') {
--current_position;
continue;
}
Expand Down

0 comments on commit 374334c

Please sign in to comment.