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

Fixes #15784 #15809

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Fixes #15784 #15809

wants to merge 1 commit into from

Conversation

Jarred-Sumner
Copy link
Collaborator

@Jarred-Sumner Jarred-Sumner commented Dec 17, 2024

What does this PR do?

Fixes #15784

I believe the bug was the Lockfile pointer was to the one on the PackageManager (manager.lockfile) instead of the newly allocated one, so when it tries to read a string from string_bytes it points to an entirely different memory address.

https://github.com/oven-sh/bun/pull/15809/files#diff-2d4db027e059280840de7dfe46dda1752467e66c1c3014369ed701b026cd06fcR3995-R3999

How did you verify your code works?

WIP.

@Jarred-Sumner Jarred-Sumner marked this pull request as draft December 17, 2024 04:13
@robobun
Copy link

robobun commented Dec 17, 2024

Updated 10:08 PM PT - Dec 16th, 2024

@Jarred-Sumner, your commit b6bd724 has passed in #8085! 🎉


🧪   try this PR locally:

bunx bun-pr 15809

) struct { cache_dir: std.fs.Dir, cache_dir_subpath: stringZ } {
const name = pkg_name;
const buf = manager.lockfile.buffers.string_bytes.items;
const buf = lockfile.buffers.string_bytes.items;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this was the bug i think

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.

bun patch crash 🥺 (symlinks)
2 participants