Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

Newer LLVM makes memset recursive #11

Closed
tari opened this issue Feb 5, 2016 · 2 comments
Closed

Newer LLVM makes memset recursive #11

tari opened this issue Feb 5, 2016 · 2 comments

Comments

@tari
Copy link

tari commented Feb 5, 2016

I've discovered that recent rustc nightlies (since January 30 at least) are smart enough to optimize memset and possibly other functions provided here into calls to the corresponding intrinsic which makes them recurse infinitely.

I'm guessing it's related to the switch to LLVM 3.8 in 303892ee15. I'm adopting a workaround with optimized assembly versions of these functions which are opaque to the optimizer, but that's not a portable nor particularly good solution.

@alexcrichton
Copy link
Owner

Hm, I wonder if the #![no_builtins] attribute was somehow broken as part of that upgrade? Or maybe it's a bug in LLVM? Not sure...

@tari
Copy link
Author

tari commented Feb 5, 2016

Oh, I failed to notice #![no_builtins] so my code (using these implementations) didn't have it.

I compiled rlibc (rather than my own code) with the same compiler and that doesn't seem to happen, so it's a problem on my end. Sorry for the noise!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants