Skip to content
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

Remove ABI-incompatible assertion code in any_view.hpp #1816

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mjbeardsley
Copy link

If a provider of an any_view is built without NDEBUG defined, but a consumer is built with NDEBUG defined (e.g., developing one project but using "release"/installed version of another), the consumer will crash due to ABI-incompatibility in any_ref.

Using "remove the assertion" as a discussion-starter, at least. I'd also understand an argument that some might want the ability to keep this assertion. If that's the case, could do something like what llvm does to separate ABI-breaking checks from non-ABI-breaking checks.

Or if we're good with just removing this assertion that works of course (as far as I can tell, it's the only ABI-breaking assertion in range-v3)

Repros on clang with sanitizers, and that's an easily shareable demo:
https://godbolt.org/z/Go9qxnjrM

Can't get it to repro with a small example in gcc, even with sanitizers

Repros in a small example on windows with msvc using same cpp/hpp files as above link - usually assertion failure in the assertion that this commit removes, sometimes Access Violation, but always crashes one way or another. No sanitizers needed to get a crash with msvc. It's just not easily shareable.

If a provider of an any_view is built without NDEBUG defined, but a
consumer is built with NDEBUG defined, the consumer will crash due to
ABI-incompatibility in any_ref.

Repros on clang with sanitizers, and that's an easily shareable demo:
  https://godbolt.org/z/Go9qxnjrM

Can't get it to repro with a small example in gcc, even with sanitizers

Repros in a small example on windows with msvc using same cpp/hpp files
as above link - usually assertion failure in the assertion that this
commit removes, sometimes Access Violation, but always crashes one way
or another. No sanitizers needed to get a crash with msvc. It's just
not easily shareable.
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.

None yet

1 participant