-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
placement new UB/DSE #56
Comments
One idea was to create wrappers with automatic
etc. All expressions became unassignable, because, |
Yeah, still bound to wrapper size by |
Got it to work with 1db08dd, but it still doesn't |
Turns out gcc allows to modify rvalue members |
This avoids strict-aliasing violation casts and unbinds us from the wrapper size.
Added 2 tickets to clang, asking for gcc-compatible extensions: |
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0476r2.html |
Nope, it gives us nothing. |
In C++23 there will be |
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2590r2.pdf |
This ticket seems to cover multiple topics. DSE problem is going to be solved with
This converts the result of __ASYM()
But this is not a problem because the |
https://gcc.gnu.org/bugzilla//show_bug.cgi?id=106658 But I think clang doesn't do so aggressive DSE, https://en.cppreference.com/w/cpp/memory/start_lifetime_as |
Smart references may circumvent that deficiency |
https://github.com/stsp/fdpp/blob/master/fdpp/farptr.hpp#L98
This placement new can trigger DSE:
https://gcc.gnu.org/gcc-6/porting_to.html#flifetime-dse
The problem was caused by a21427f.
Clang doesn't seem to support
-fno-lifetime-dse
option.I wonder if the patch should be reverted.
But the revert will likely cause strict aliasing violation.
The text was updated successfully, but these errors were encountered: