Open NFTBattle opened 9 months ago
1.0
Linux 6.2.0-32-generic x86_64 x86_64
When I run this code, it will keep eating up memory until the os crashes.
function generateRandomSha256(maxLength = 128) { const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; const randomString = [...Array(maxLength)].map(() => characters.charAt(Math.floor(Math.random() * characters.length))).join(''); const hasher = new Bun.CryptoHasher("sha256"); hasher.update(randomString); return hasher.digest(); } while (true) { let randomData = generateRandomSha256(); const hashedData = await Bun.password.hash(randomData , { algorithm: "argon2id", memoryCost: 120, timeCost: 1, salt: "THIS-CAUSES-MEMORY-LEAK" }); console.log(hashedData); }
garbage cleanup should keep memory in check, nothing about this code should keep taking up more memory.
memory keeps going up until os crashes
No response
is this still impacting you? tried this on Bun 1.1.9 and am not seeing any discernible rise in ram usage anymore on my end.
What version of Bun is running?
1.0
What platform is your computer?
Linux 6.2.0-32-generic x86_64 x86_64
What steps can reproduce the bug?
When I run this code, it will keep eating up memory until the os crashes.
What is the expected behavior?
garbage cleanup should keep memory in check, nothing about this code should keep taking up more memory.
What do you see instead?
memory keeps going up until os crashes
Additional information
No response