Skip to content

Ensure bounds are not inserted into unwritable files #689

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

Merged
merged 4 commits into from
Aug 26, 2021

Conversation

john-h-kastner
Copy link
Collaborator

@john-h-kastner john-h-kastner commented Aug 25, 2021

Adds checks to ensure that 3C will not attempt to rewrite in unwritable files to insert array bounds. The test file in this PR contains an example using a function body in an unwritable file which fails on the current main. After changes made to support rewriting in functions declarations without definitions, this can happen even when the functions are not defined, and it becomes a more prevalent issue.

Copy link
Member

@kyleheadley kyleheadley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

This change is mostly a refactor to simplify code and add a canWrite in a couple key places. So as long as the tests pass I don't believe I need any specific knowledge to approve.

@john-h-kastner john-h-kastner merged commit d7b9b2d into main Aug 26, 2021
@john-h-kastner john-h-kastner deleted the unwritable_bounds branch August 26, 2021 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants