-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Fix set_port to return correct boolean value #836
Conversation
It looks like checking that in the set_port (before the parse_port) does not cause some tests to fail... Now I am wondering about the fuzzers. |
I think fuzzers are unrelated. It's failing on another PR. |
@@ -791,6 +791,12 @@ bool url::set_port(const std::string_view input) { | |||
return false; | |||
} | |||
|
|||
uint16_t parsed_port{}; | |||
std::from_chars(trimmed.data(), trimmed.data() + trimmed.size(), parsed_port); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be slower. can we do it inside parse_port()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that was my initial attempt here e998da7, but these tests started failing:
6 - wpt_url_tests_typed.urltestdata_encoding<ada::url> (Failed)
9 - wpt_url_tests_typed.urltestdata_encoding<ada::url_aggregator> (Failed)
16 - url_components.urltestdata_encoding (Failed)
was my approach wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "bad expected access" means that there is another bug that's surfaced because of your change. Which is good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, so I'll bring those changes back, and check if I can get more info about this bug.
Closing in favor of #839 |
Fix: #826