You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was not able to create a minimal reproduciable repo for this so I will try to note everything relevant here
Have an react component as tsx file (e.g. someComponent.tsx)
import an image via an JS import and query parameters
e.g. import clippy_webp from '../../../assets/img/Clippy.webp?format=webp&h=25&=25'
return an jsx element which includes the js import as a src attribute
e.g. return <img src={clippy_webp} alt="Clippy" />
run a bun test with a test that imports the file
What is the expected behavior?
the test succeeds every time (no segmentation fault)
What do you see instead?
when having one import with query parameters, in 1/10 of the cases I get the following error: [1] 6830 segmentation fault bun test
When adding more imports with query paremeters, the chance of failure increases until at ~10 imports it pretty much always fails.
Additional information
The whole query parameter for image imports is used by this
I tried really hard to reproduce the issue in a minimal repo but failed. What I tried:
just having an image import with query parameters
trying out different query parameters
trying out different image types
referencing the import in function returns
referencing the import in jsx returns
I also took a look at the bun source code and identify the issue but failed to write a meaningful test to verify my assumptions (also not a zig dev so dont know about string specifics). But I assume it is something with this line copying to much/less https://github.com/oven-sh/bun/blob/main/src/bun.js/module_loader.zig#L2084
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.0.33
What platform is your computer?
Darwin 23.4.0 arm64 arm
What steps can reproduce the bug?
Was not able to create a minimal reproduciable repo for this so I will try to note everything relevant here
someComponent.tsx
)e.g.
import clippy_webp from '../../../assets/img/Clippy.webp?format=webp&h=25&=25'
e.g.
return <img src={clippy_webp} alt="Clippy" />
bun test
with a test that imports the fileWhat is the expected behavior?
the test succeeds every time (no segmentation fault)
What do you see instead?
when having one import with query parameters, in 1/10 of the cases I get the following error:
[1] 6830 segmentation fault bun test
When adding more imports with query paremeters, the chance of failure increases until at ~10 imports it pretty much always fails.
Additional information
The whole query parameter for image imports is used by this
I tried really hard to reproduce the issue in a minimal repo but failed. What I tried:
I also took a look at the bun source code and identify the issue but failed to write a meaningful test to verify my assumptions (also not a zig dev so dont know about string specifics). But I assume it is something with this line copying to much/less
https://github.com/oven-sh/bun/blob/main/src/bun.js/module_loader.zig#L2084
The text was updated successfully, but these errors were encountered: