-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
[Regression] Stack pointer corruption on ARMv7 #52723
Comments
Referencing #51489. |
@TNorthover Should we revert d88f96d this on the release/13.x branch? |
Oh dear. If it reverts cleanly that's probably the sensible choice. Swift is the only project that really cares about the feature and it has its own branching. I'll hang onto this issue to sort out a proper fix when I get back to work. |
Thanks Tim! The good side of it is that we have reverted it for a about a month now (with the patch above) and so far spotted no issues. We only use C and very little C++ though. |
The arguments for |
Some test cases fail when I try to build with the attached patch to revert. Would it be better to backport https://reviews.llvm.org/D116805 instead? |
We will test https://reviews.llvm.org/D116805 on 13.0.0 branch against this issue tomorrow or so. |
@vit9696 OK, I want to tag the release on Wednesday at the latest, so the sooner you can test and ACK the patch, the better. |
Done, as long as the tests pass, I believe it is a much better approach than reverting. |
Should be fixed on main now by 0b5b35f. |
Merged: eaeb7dc |
There is a stack pointer corruption regression in LLVM 13 causing stack leak (at least) with ASAN enabled when targeting cortex-a9.
The issue is reproducible with the code below:
It can also be viewed online. The arguments to compile are as follows:
clang -o error.o -c -target arm-gnu-linux-eabi -mcpu=cortex-a9 -fsanitize=address error.c
The problematic part is the loop in the
test
function. Whenfunc
is called, LLVM does not adjust the stack back, causing fast stack overflow:LLVM 12.0.1 does not have this issue. The issue is present in main and is caused by d88f96d. Differential: https://reviews.llvm.org/D102613.
Reverting the patch resolves the problem, but I am not well familiar with that part of LLVM to drive the change.
CC @tstellar, this should be a blocker for 13.0.1 as it is a regression.
CC @TNorthover, @ornata, could you provide any information on a proper fix?
0001-Revert-ARM-support-mandatory-tail-calls-for-tailcc-s.patch.zip
The text was updated successfully, but these errors were encountered: