Skip to content

Conversation

@watilde
Copy link
Contributor

@watilde watilde commented Jan 3, 2026

No description provided.

// This triggers assertion failure in debug mode for url_aggregator
// because get_pathname() returns a view into the buffer, and set_hostname()
// modifies it.
url->set_hostname(url->get_pathname());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. That's not allowed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are acquiring a view into the URL, and then, at the same time, trying to modify the URL. You need to make a copy first.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that this isn't the correct solution. We already have debug assertions that validates this behavior if i remember correctly it is ADA_DEVELOPMENT_CHECKs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants