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
__attribute__((no_stack_protector)) is overridden by inlining #52886
Comments
Well I think a decent solution here would be to add a string attribute like no-jump-tables that just tells that function that changing stack protection levels on the caller is a no-no. |
after checking the review, https://reviews.llvm.org/D91816, always_inline might be a special case for ssp and no-ssp |
Hm, so this might be intended behavior? |
might be cc @nickdesaulniers |
yes, that's the intention, though @zmodem also brought up that maybe we should change this for always_inline (further weakening the "always" part of "always inline"). |
I don't really know how I feel about this.. I'd rather have something marked always_inline be, well, inlined, without a stack protector; for example, if you have a set of performance-critical functions separated out to not duplicate code, or some thirdparty dependency that you expect to be inlined when using |
I will try to update the document in clang and try to connect with @nickdesaulniers . |
(The discussion from Chromium is here: https://crbug.com/1274129) My preference would be to not bring along the stack protector when inlining. |
Taking a stab at this here: https://reviews.llvm.org/D116589 |
Committed as 2bc57d8. |
Repro
Root cause seems to be that
Attributes.cpp::adjustCallerSSPLevel
does not have a way to check whether this attribute was added.The text was updated successfully, but these errors were encountered: