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

runtime safety checking for pointer arithmetic #1918

Open
andrewrk opened this issue Feb 5, 2019 · 1 comment
Open

runtime safety checking for pointer arithmetic #1918

andrewrk opened this issue Feb 5, 2019 · 1 comment
Labels
docs enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness.
Projects
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Feb 5, 2019

There should be a test in test/runtime_safety.zig to make sure that unknown length pointer arithmetic does not wrap past the end of the address space.

@andrewrk andrewrk added the enhancement Solving this issue will likely involve adding new logic or components to the codebase. label Feb 5, 2019
@andrewrk andrewrk added this to the 0.5.0 milestone Feb 5, 2019
@andrewrk andrewrk added the docs label Feb 15, 2019
@andrewrk
Copy link
Member Author

Extracted from #1059 (comment)

  • compile error test for compile time pointer arithmetic overflowing
  • runtime safety test for pointer arithmetic overflowing
  • compile error test for comptime ptr arithmetic with undefined
  • docs

These apply to unknown length pointers and C pointers.

@andrewrk andrewrk modified the milestones: 0.5.0, 0.6.0 Sep 20, 2019
@andrewrk andrewrk added this to To do in Safety Oct 17, 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 Aug 24, 2022
@andrewrk andrewrk modified the milestones: 0.11.0, 0.12.0 Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs enhancement Solving this issue will likely involve adding new logic or components to the codebase. frontend Tokenization, parsing, AstGen, Sema, and Liveness.
Projects
Safety
  
To do
Development

No branches or pull requests

1 participant