[PATCH] D139254: Enhance stack protector
Xiang Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 6 18:12:04 PST 2022
xiangzhangllvm added a comment.
In D139254#3976724 <https://reviews.llvm.org/D139254#3976724>, @xiangzhangllvm wrote:
> In D139254#3974001 <https://reviews.llvm.org/D139254#3974001>, @alexfh wrote:
>
>> There's a problem in the previous iteration of this patch (https://reviews.llvm.org/D138774). It made clang hang while compiling the following short snippet reduced from an open-source library (compiled on x86-64, linux):
>
> I check it, the clang still hang, let me check and fix it. Thanks very much!
I root cause it, this is a very special case : )
The function "__stack_chk_fail" define in the upper case is also the Stack Protection will also use (and auto generate call for it).
The option "-fstack-protector-all" required "__stack_chk_fail" function self to be checked (by use "__stack_chk_fail" self too.)
So this cause the Infinite loop for checking "__stack_chk_fail", and make clang hang.
This was a defect in StackProtector and exposed by current patch.
Let me fix it. Thanks again!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139254/new/
https://reviews.llvm.org/D139254
More information about the llvm-commits
mailing list