New user self-registration is disabled due to spam. For an account please email bugs-admin@lists.llvm.org with your e-mail address and full name.

Bug 47657 - -O2 -fstack-clash-protection alloca(0) SEGV
Summary: -O2 -fstack-clash-protection alloca(0) SEGV
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: LLVM Codegen (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: sguelton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-26 14:33 PDT by Jan Kratochvil
Modified: 2020-12-02 08:38 PST (History)
5 users (show)

See Also:
Fixed By Commit(s): 9573c9f2a363da71b2c07a3add4e52721e6028a0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kratochvil 2020-09-26 14:33:09 PDT
echo -e '#include <alloca.h>\n#include <stdint.h>\nlong size;int main() {return (uintptr_t)alloca(size);}'|clang -O2 -fstack-clash-protection -Wall -x c++ -;./a.out
Segmentation fault

FAIL: clang-11.0.0-0.3.rc2.fc34.x86_64
FAIL: c6c5629f2fb4ddabd376fbe7c218733283e91d09 = 2020-09-25
PASS: gcc-10.2.1-4.fc34.x86_64
Comment 1 Sylvestre Ledru 2020-12-02 07:44:54 PST
Serge, what about merging this fix for 11.0.1?
thanks
Comment 2 sguelton 2020-12-02 08:38:24 PST
This already is integrated as a1e0363c7402f7aa58e24e0e6dfa447ebabc1910