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

Create a prefix in each instrumented file #104

Merged
merged 7 commits into from
Dec 13, 2024

Conversation

uurien
Copy link
Collaborator

@uurien uurien commented Dec 4, 2024

What does this PR do?

Add a prefix in each instrumented file to prevent crashes when the global._ddiast object is not initialized.

Motivation

When instrumentation is done with ESM, we can not be sure that the rewrite is coming from a thread where tracer and iast are initialized.

Additional Notes

Describe how to test your changes

Checklist

  • The CHANGELOG.md has been updated
  • Unit tests have been updated and pass
  • If known, an appropriate milestone has been selected

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As we are adding the prefix by default in each file, the code for add no ops in v8 tests are not necessary anymore.

@uurien uurien marked this pull request as ready for review December 10, 2024 09:36
@uurien uurien requested a review from a team as a code owner December 10, 2024 09:36
@uurien uurien force-pushed the ugaitz/protect-if-no-_ddiast-exist branch from e57699d to a8d3be7 Compare December 12, 2024 16:55
@uurien uurien merged commit 0fe3bb9 into main Dec 13, 2024
21 checks 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.

2 participants