Skip to content
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

-fstack-check is not supported (catching infinite recursion) #2380

Closed
llvmbot opened this issue Feb 10, 2008 · 5 comments
Closed

-fstack-check is not supported (catching infinite recursion) #2380

llvmbot opened this issue Feb 10, 2008 · 5 comments
Labels
bugzilla Issues migrated from bugzilla llvm-tools All llvm tools that do not have corresponding tag obsolete wontfix Resolved as "WON'T FIX." Not "INVALID" — the issue is real, but we can't or won't fix it

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 10, 2008

Bugzilla Link 2008
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @CodingMarkus

Extended Description

Compiling a program with -fstack-check is supposed to add
code to check for stack overflow. This does not happen
with llvm-gcc. I've filed this option under tools/gnat
because in mainline this option only works with the Ada
front-end. However patches to mainline have been proposed
that generalize this functionality to all languages. It
seems like a useful feature for LLVM to support.

@lattner
Copy link
Collaborator

lattner commented Feb 10, 2008

Is this related to the -fstack-protector option? I thought 4.2 had some support for stack canaries.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Feb 10, 2008

It's not related to -fstack-protector: that's trying to prevent people
from overwriting your stack. -fstack-check is about checking that (via
recursion or whatever) you do not make the stack so big that it runs into
the heap or some other bad place. Ada doesn't really have a buffer overflow
problem since the compiler is required to insert code to check that there
are no out of range accesses, so -fstack-protector isn't really useful for
it. However stack overflow is a potential problem.

@lattner
Copy link
Collaborator

lattner commented Feb 10, 2008

ah, ok!

@llvmbot
Copy link
Collaborator Author

llvmbot commented Jun 26, 2012

This is the reason for the ACATS test c52104y failing.

@CodingMarkus
Copy link
Mannequin

CodingMarkus mannequin commented Jun 25, 2013

Are there any plans to ever fix this bug? It seems that even in the latest version of clang the option "-fstack-check" has no effect on the generated code. At least a test case, that should definitely crash if stack checking was supported (and it does crash on Darwin, when building with GCC), does not crash if compiled with clang.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
@asl asl added obsolete wontfix Resolved as "WON'T FIX." Not "INVALID" — the issue is real, but we can't or won't fix it labels Dec 14, 2021
@asl asl closed this as completed Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm-tools All llvm tools that do not have corresponding tag obsolete wontfix Resolved as "WON'T FIX." Not "INVALID" — the issue is real, but we can't or won't fix it
Projects
None yet
Development

No branches or pull requests

3 participants