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

Fixed tracking of argument scope. #731

Merged
merged 1 commit into from
Jun 10, 2024
Merged

Conversation

xeioex
Copy link
Contributor

@xeioex xeioex commented Jun 8, 2024

This properly catches unsupported "await" in arguments.

This fixes #730 issue on Github.

Checklist

Before creating a PR, run through this checklist and mark each as complete:

  • I have read the CONTRIBUTING document
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes

@xeioex xeioex requested a review from VadimZhestikov June 8, 2024 04:51
Copy link
Contributor

@VadimZhestikov VadimZhestikov left a comment

Choose a reason for hiding this comment

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

May be we can use more simple approach instead of js_parser_scope_begin/end, like
just increment/decrement parser->scope->in_args instead of assigning it 1 or 0

This properly catches unsupported "await" in arguments.

This fixes nginx#730 issue on Github.
@xeioex xeioex force-pushed the fix_await_in_args branch from 4bc44a5 to fe30d3b Compare June 10, 2024 22:13
@xeioex xeioex requested a review from VadimZhestikov June 10, 2024 22:13
@xeioex xeioex merged commit 9ade27b into nginx:master Jun 10, 2024
1 check passed
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.

heap-use-after-free src/njs_value.h:992:27
2 participants