node-mariasql
node-mariasql copied to clipboard
Hard crash when ssl=true and connecting to offline server
When connecting to the database over SSL, but the server is offline, mariasql emits an error event with the following message:
Error: Can't connect to MySQL server on '127.0.0.1' (61)
Then before the close event is emitted, the following crash occurs:
node(28217,0x7fff75026310) malloc: *** error for object 0x103c55180: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
This will cause the Node.js process to exit. No bueno.
I'm on OS X 10.9.3, Node.js 0.10.28, mariasql v0.1.21, libmariadbclient 5.5.30.
If server is online, it's also crash with breakpoint:
node(27758,0x7fff79d85300) malloc: *** error for object 0x101ccf20e: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
@egavrilov Can you please try with the rewrite branch?
@mscdex nothing happens on default example, neither connect, nor error message.