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

fix: Macro segmentation faults #6756

Merged
merged 7 commits into from Oct 30, 2023
Merged

Conversation

I-A-S
Copy link
Contributor

@I-A-S I-A-S commented Oct 27, 2023

What does this PR do?

  • Code changes

Fixes the occurrence of segmentation faults under certain macro inputs as indicated by issues #3830, #6014 and #6704. Bun will now display the relevant error instead of crashing with a segmentation fault.

How did you verify your code works?

  • I checked the lifetime of memory allocated to verify it's (1) freed and (2) only freed when it should be
  • I or my editor ran zig fmt on the changed files

@I-A-S I-A-S changed the title Fix for macro seg faults fix: Macro segmentation faults Oct 27, 2023
src/js_ast.zig Outdated Show resolved Hide resolved
@Jarred-Sumner
Copy link
Collaborator

A test would be great. I think we should merge this regardless, but it'd be easy for this to regress in the future without a test.

@I-A-S
Copy link
Contributor Author

I-A-S commented Oct 30, 2023

A test would be great. I think we should merge this regardless, but it'd be easy for this to regress in the future without a test.

Agreed I'll add a test.

@I-A-S
Copy link
Contributor Author

I-A-S commented Oct 30, 2023

Added a test

@Jarred-Sumner Jarred-Sumner merged commit cbc5ca7 into oven-sh:main Oct 30, 2023
@Jarred-Sumner
Copy link
Collaborator

Thank you

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.

None yet

2 participants