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

add stack protector safety feature for non-libc builds #276

Open
andrewrk opened this issue Mar 23, 2017 · 1 comment
Open

add stack protector safety feature for non-libc builds #276

andrewrk opened this issue Mar 23, 2017 · 1 comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone

Comments

@andrewrk
Copy link
Member

We should mark every function with sspstrong when runtime safety checks are on (debug or safe-release mode), unless the function has debug safety explicitly disabled.

@andrewrk andrewrk added the enhancement Solving this issue will likely involve adding new logic or components to the codebase. label Mar 23, 2017
@andrewrk andrewrk modified the milestone: 0.1.0 Mar 26, 2017
andrewrk added a commit that referenced this issue Mar 27, 2017
 * introduce zigrt file. it contains only weak symbols so that
   multiple instances can be merged. it contains __zig_panic
   so that multiple .o files can call the same panic function.
 * remove `@setFnVisible` builtin and add @setGlobalLinkage builtin
   which is more powerful
 * add `@panic` builtin function.
 * fix collision of symbols with extern prototypes and internal
   function names
 * add stack protector safety when linking against libc. To add
   the safety mechanism without libc requires implementing
   Thread Local Storage. See #276
@andrewrk
Copy link
Member Author

Turns out this feature depends on Thread Local Storage being implemented in a certain way. I'm not entirely sure how deep the dependency goes, but for now I enabled this feature only when linking against libc.

We still have hope of this feature being enabled without libc, but it's not as straightforward as previously assumed.

@andrewrk andrewrk changed the title add stack protector as a debug safety feature add stack protector safety feature for non-libc builds Mar 27, 2017
@andrewrk andrewrk modified the milestones: 0.2.0, 0.1.0 Mar 27, 2017
@andrewrk andrewrk modified the milestones: 0.2.0, 0.3.0 Oct 19, 2017
@andrewrk andrewrk modified the milestones: 0.3.0, 0.4.0 Feb 28, 2018
@andrewrk andrewrk modified the milestones: 0.4.0, 0.5.0 Nov 28, 2018
@andrewrk andrewrk modified the milestones: 0.5.0, 0.6.0 Aug 19, 2019
@andrewrk andrewrk modified the milestones: 0.6.0, 0.7.0 Feb 10, 2020
@andrewrk andrewrk added the frontend Tokenization, parsing, AstGen, Sema, and Liveness. label Oct 9, 2020
@andrewrk andrewrk modified the milestones: 0.7.0, 0.8.0 Oct 9, 2020
@andrewrk andrewrk modified the milestones: 0.8.0, 0.9.0 Jun 4, 2021
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 Nov 21, 2021
@andrewrk andrewrk modified the milestones: 0.10.0, 0.11.0 Apr 17, 2022
@andrewrk andrewrk removed this from the 0.11.0 milestone Apr 9, 2023
@andrewrk andrewrk added this to the 0.12.0 milestone Apr 9, 2023
@mlugg mlugg added this to Safety Aug 22, 2024
@mlugg mlugg moved this to To do in Safety Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness.
Projects
Status: To do
Development

No branches or pull requests

1 participant