-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Bun v0.7.3 crashes with node-mysql2 module, works fine in v0.7.0 #4119
Comments
Stack trace: 59 | static fromPacket(packet) {
60 | const args = {};
61 | console.log(packet)
62 | args.protocolVersion = packet.readInt8();
63 | args.serverVersion = packet.readNullTerminatedString('cesu8');
64 | args.connectionId = packet.readInt32();
^
RangeError: Out of bounds access
at fromPacket (node_modules/mysql2/lib/packets/handshake.js:64:24)
at handshakeInit (node_modules/mysql2/lib/commands/client_handshake.js:112:21)
at execute (node_modules/mysql2/lib/commands/command.js:45:16)
at handlePacket (node_modules/mysql2/lib/connection.js:478:19)
at node_modules/mysql2/lib/connection.js:97:6
at executeStart (node_modules/mysql2/lib/packet_parser.js:75:10)
at node_modules/mysql2/lib/connection.js:104:6
at addChunk (node:stream:1803:46) The message |
Will this be fixed soon? Or do you need further comments? |
@brynne8 I suspect it's a library bug and that this code worked in an earlier version of Bun is a bug The below snippet based on your snippet doesn't run successfully in Node: const mysql = require("mysql2/promise");
async function main() {
const pool = await mysql.createPool({
host: "localhost",
port: 33060,
user: "root",
password: "ZlwyV9dQM0?p",
});
const { fields } = await pool.query(`SELECT * FROM tb_xxx WHERE id = ?`, [1]);
console.log(fields);
}
main(); |
Do did just exposed your local password of user |
We run integration tests for mysql2 in CI nowadays, so I'm pretty confident this particular issue is fixed |
What version of Bun is running?
0.7.3
What platform is your computer?
Linux 5.14.0-284.11.1.el9_2.x86_64 x86_64 x86_64
What steps can reproduce the bug?
node-mysql2
module.What is the expected behavior?
The application should run without any issues, and the routes should be accessible.
What do you see instead?
The application crashes when visiting
/order
with the errorTrace/breakpoint trap (core dumped)
.Additional information
The text was updated successfully, but these errors were encountered: