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
A reproducible access violation occurs on connection shutdown, when there have events been registered.
Occurs only for XNET connections.
Workaround: If I force local connection via tcp/ip per "inet://..." database name, it works all properly.
The access violation is raised when accessing "xch" in the loop of function "xnet_read":
======Code from xnet.cpp - begin =======
while (!xnet_shutdown)
{
\.\.\.
const DWORD wait\_result =
WaitForSingleObject\(xcc\-\>xcc\_event\_recv\_channel\_filled, XNET\_RECV\_WAIT\_TIMEOUT\);
if \(wait\_result == WAIT\_OBJECT\_0\)
\{
// Client has written some data for us \(server\) to read
port\-\>port\_rcv\_packets\+\+;
port\-\>port\_rcv\_bytes \+= xch\-\>xch\_length; // <\-\-\-\-\-\- the memory address of 'xch' is invalid
xdrs\-\>x\_handy = xch\-\>xch\_length;
xdrs\-\>x\_private = xdrs\-\>x\_base;
return TRUE;
\}
\.\.\.
\}
======Code from xnet.cpp - end=======
I created a command line application for testing, which I uploaded to this issue:
A command line »FirebirdEventListenerCrashTest.exe "inet://%cd%\MYDB.FDB" -u:SOMEBODY -p:something« will run successfully.
A command line »FirebirdEventListenerCrashTest.exe "xnet://%cd%\MYDB.FDB" -u:SOMEBODY -p:something« will stop prematurely.
description: A reproducible access violation occurs on connection shutdown, when there have events been registered.
Occurs only for XNET connections.
Workaround: If I force local connection via tcp/ip per "inet://..." database name, it works all properly.
The access violation is raised when accessing "xch" in the loop of function "xnet_read":
{code:c++}
while (!xnet_shutdown)
{
\.\.\.
const DWORD wait\_result =
WaitForSingleObject\(xcc\-\>xcc\_event\_recv\_channel\_filled, XNET\_RECV\_WAIT\_TIMEOUT\);
if \(wait\_result == WAIT\_OBJECT\_0\)
\{
// Client has written some data for us \(server\) to read
port\-\>port\_rcv\_packets\+\+;
port\-\>port\_rcv\_bytes \+= xch\-\>xch\_length; // <\-\-\-\-\-\- the memory address of 'xch' is invalid
xdrs\-\>x\_handy = xch\-\>xch\_length;
xdrs\-\>x\_private = xdrs\-\>x\_base;
return TRUE;
\}
\.\.\.
\}
{code}
I created a command line application for testing, which I uploaded to "https://nextcloud.hksinformatik.de/index.php/s/cBsMmR3iXjogx2f" (password: firebirdcrash):
A command line {{FirebirdEventListenerCrashTest.exe "inet://%cd%\MYDB.FDB" -u:SOMEBODY -p:something}} will run successfully.
A command line {{FirebirdEventListenerCrashTest.exe "xnet://%cd%\MYDB.FDB" -u:SOMEBODY -p:something}} will stop prematurely.
=>
A reproducible access violation occurs on connection shutdown, when there have events been registered.
Occurs only for XNET connections.
Workaround: If I force local connection via tcp/ip per "inet://..." database name, it works all properly.
The access violation is raised when accessing "xch" in the loop of function "xnet_read":
======Code from xnet.cpp - begin =======
while (!xnet_shutdown)
{
\.\.\.
const DWORD wait\_result =
WaitForSingleObject\(xcc\-\>xcc\_event\_recv\_channel\_filled, XNET\_RECV\_WAIT\_TIMEOUT\);
if \(wait\_result == WAIT\_OBJECT\_0\)
\{
// Client has written some data for us \(server\) to read
port\-\>port\_rcv\_packets\+\+;
port\-\>port\_rcv\_bytes \+= xch\-\>xch\_length; // <\-\-\-\-\-\- the memory address of 'xch' is invalid
xdrs\-\>x\_handy = xch\-\>xch\_length;
xdrs\-\>x\_private = xdrs\-\>x\_base;
return TRUE;
\}
\.\.\.
\}
======Code from xnet.cpp - end=======
I created a command line application for testing, which I uploaded to this issue:
A command line »FirebirdEventListenerCrashTest.exe "inet://%cd%\MYDB.FDB" -u:SOMEBODY -p:something« will run successfully.
A command line »FirebirdEventListenerCrashTest.exe "xnet://%cd%\MYDB.FDB" -u:SOMEBODY -p:something« will stop prematurely.
Submitted by: René Hoffmann (rhoffmann)
Attachments:
FirebirdEventListenerCrashTest.zip
A reproducible access violation occurs on connection shutdown, when there have events been registered.
Occurs only for XNET connections.
Workaround: If I force local connection via tcp/ip per "inet://..." database name, it works all properly.
The access violation is raised when accessing "xch" in the loop of function "xnet_read":
======Code from xnet.cpp - begin =======
while (!xnet_shutdown)
{
======Code from xnet.cpp - end=======
I created a command line application for testing, which I uploaded to this issue:
A command line »FirebirdEventListenerCrashTest.exe "inet://%cd%\MYDB.FDB" -u:SOMEBODY -p:something« will run successfully.
A command line »FirebirdEventListenerCrashTest.exe "xnet://%cd%\MYDB.FDB" -u:SOMEBODY -p:something« will stop prematurely.
Commits: be2d771 839c9f6
The text was updated successfully, but these errors were encountered: