-
Notifications
You must be signed in to change notification settings - Fork 98
Description
I'm running into a strange bug on mac osx: exceptions are not caught properly in the C++ code. Instead I'm getting a terminate called after throwing an instance of 'NodeOracleException'
message and the node process goes into an infinite loop (and it takes a kill -9
to kill it).
This occurs in several places. One example is with following stack:
ExecuteBaton::CopyValuesToBaton
ExecuteBaton::ExecuteBaton
Connection::Execute
If execution reaches the throw
at then end of CopyValuesToBaton
because val
is undefined then the exception should be caught by the following block in Connection::Execute
:
try {
baton = new ExecuteBaton(connection, *sqlVal, &values, NULL);
} catch(NodeOracleException &ex) {
return ThrowException(Exception::Error(String::New(ex.getMessage().c_str())));
}
But it is not!!
I'm suspecting either a problem with compiler options or a memory corruption.
I managed to get rid of the infinite loop by recompiling the driver without the -Os
option: the exception is still not caught but I'm getting an abort trap 6
instead. But I did not manage to fix the problem by playing with the other options. I tried to remove the -fno-rtti
and add a -fexceptions
but had no luck.
I'm running node 0.10.20 on OSX 10.8.5