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
When stopping Firebird service from Windows service manager, Firebird process crashes and an unexpected termination error is displayed.
The following Windows system log entry is produced:
The Firebird Server - FirebirdServer3.0 service terminated unexpectedly. It has done this 1 time(s).
In header src/remote/os/win32/wnet_proto.h WNET_connect is declared as a C function by using extern "C", but other code expects exceptions to be raised from that function.
For example, in file src\remote\server\os\win32\srvr_w32.cpp:
try
{
port = WNET_connect(protocol_wnet, NULL, server_flag, NULL);
}
catch (const Exception& ex)
{
SimpleStatusVector<> status_vector;
ex.stuffException(status_vector);
if (status_vector[1] == isc_net_server_shutdown)
break;
iscLogException("WNET_connect", ex);
}
As far as I understand, C functions marked should not throw exceptions, because it triggers undefined behavior.
I fixed this crash by deleting extern "C" from src/remote/os/win32/wnet_proto.h header file, but I am not sure if this fix is acceptable, because I do not know the reason why extern "C" is used in that file.
Submitted by: Albertas Vyšniauskas (thezbyg)
When stopping Firebird service from Windows service manager, Firebird process crashes and an unexpected termination error is displayed.
The following Windows system log entry is produced:
The Firebird Server - FirebirdServer3.0 service terminated unexpectedly. It has done this 1 time(s).
In header src/remote/os/win32/wnet_proto.h WNET_connect is declared as a C function by using extern "C", but other code expects exceptions to be raised from that function.
For example, in file src\remote\server\os\win32\srvr_w32.cpp:
try
{
port = WNET_connect(protocol_wnet, NULL, server_flag, NULL);
}
catch (const Exception& ex)
{
SimpleStatusVector<> status_vector;
ex.stuffException(status_vector);
if (status_vector[1] == isc_net_server_shutdown)
break;
iscLogException("WNET_connect", ex);
}
As far as I understand, C functions marked should not throw exceptions, because it triggers undefined behavior.
I fixed this crash by deleting extern "C" from src/remote/os/win32/wnet_proto.h header file, but I am not sure if this fix is acceptable, because I do not know the reason why extern "C" is used in that file.
Commits: de09fa3 e182592
The text was updated successfully, but these errors were encountered: