-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
libafl_bolts tuples relies on standard library implementation details #2648
Comments
Feel free to propose a better / sound way. I sadly don't know of any. FWIW we do run tests in CI and would catch future breakage: LibAFL/libafl_bolts/src/tuples.rs Line 890 in 89cff63
I agree it's not a good solution, but it'll be pretty hard to come up with a better one.. |
There is indeed not really a better way. As I said, this is not an operation that can be implemented correctly. I recommend just deleting the functions. This repo doesn't seem to use it, and users of the crate need to find a different way. |
It's used here: LibAFL/libafl_bolts/src/tuples.rs Lines 495 to 501 in 89cff63
And that's a pretty important piece, if we just leave it out we can run into type confusions everywhere.. I don't think there is much we can do until/if ever min_specialization lands, sadly.. |
LibAFL/libafl_bolts/src/tuples.rs
Lines 27 to 58 in 89cff63
this code here relies on the (unsound) specialization of Copy for cloning of arrays. I hope I don't have to explain why that's a problem^^. this will probably break in the future (since it's unsound), either with the specialization being removed, the lifetime-dependent Copy implementation being an error or both.
how else should it be implemented then? not. this operation cannot be implemented correctly and a different way to do the stuff that uses it today needs to be found.
The text was updated successfully, but these errors were encountered: