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 thread safety issue in async fs functions file paths #3964

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

Jarred-Sumner
Copy link
Collaborator

What does this PR do?

Call .isolatedCopy() on strings we pass from JS -> another thread so that atomic strings doesn't crash. Fixes a crash impacting Astro CLI & Vite.

How did you verify your code works?

Added a couple automated tests. Manually checked memory usage difference

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

@Jarred-Sumner 1 files with test failures on bun-darwin-aarch64:

  • test/js/bun/test/test-test.test.ts

View test output

#298d63b2d4c36591d93c320ea1d6b701416dd789

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

@Jarred-Sumner 1 files with test failures on linux-x64:

  • test/js/third_party/prisma/prisma.test.ts

View test output

#298d63b2d4c36591d93c320ea1d6b701416dd789

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

@Jarred-Sumner 1 files with test failures on linux-x64-baseline:

  • test/js/third_party/prisma/prisma.test.ts

View test output

#298d63b2d4c36591d93c320ea1d6b701416dd789

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

@Jarred-Sumner 4 files with test failures on bun-darwin-x64-baseline:

  • test/js/bun/spawn/spawn-streaming-stdin.test.ts
  • test/js/bun/sqlite/sqlite.test.js
  • test/js/third_party/webpack/webpack.test.ts
  • test/js/web/timers/setTimeout.test.js

View test output

#298d63b2d4c36591d93c320ea1d6b701416dd789

@Jarred-Sumner Jarred-Sumner merged commit 9beccc3 into main Aug 4, 2023
15 of 20 checks passed
@Jarred-Sumner Jarred-Sumner deleted the jarred/threadsafe branch August 4, 2023 03:09
trnxdev pushed a commit to trnxdev/bun that referenced this pull request Aug 9, 2023
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
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.

1 participant