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

Revisit NOP cases for intrinsics #433

Closed
RalfJung opened this issue Aug 15, 2018 · 3 comments
Closed

Revisit NOP cases for intrinsics #433

RalfJung opened this issue Aug 15, 2018 · 3 comments

Comments

@RalfJung
Copy link
Member

copy, copy_nonoverlapping and write_bytes currently accept bad pointers when the size is 0, because libstd relies on this.

I think we should enforce the check, and fix libstd.

@eddyb
Copy link
Member

eddyb commented Aug 15, 2018

This is a point of debate in C, too, isn't it? Do we have something conclusive to rely on, and enforce?

@RalfJung
Copy link
Member Author

RalfJung commented Aug 15, 2018

It's UB in C, but compilers do not dare exploiting that in general.

I wrote to llvm-dev last year and was unable to get a definite answer out of them, see this mailing list thread.

So, the safest thing to do is to say that it's UB for us...

@RalfJung
Copy link
Member Author

I just opened a bug on their side to maybe get something moving: https://bugs.llvm.org/show_bug.cgi?id=38583

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

No branches or pull requests

2 participants