8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 21:23:03 +01:00

Fixed my 6-years old but unnoticed bug with circular strings buffer

(cherry picked from commit 79da7e449e)
(cherry picked from commit b5d72efdd5)
This commit is contained in:
AlexPeshkoff 2021-11-10 18:27:55 +03:00
parent ceabdd62f6
commit d2b4b6d4c9

View File

@ -2934,7 +2934,7 @@ void makeKey()
int err = pthread_key_create(&key, ThreadCleanup::destructor); int err = pthread_key_create(&key, ThreadCleanup::destructor);
if (err) if (err)
{ {
Firebird::system_call_failed("pthread_key_create", err); Firebird::system_call_failed::raise("pthread_key_create", err);
} }
keySet = true; keySet = true;
} }
@ -2944,13 +2944,13 @@ void ThreadCleanup::initThreadCleanup()
int err = pthread_once(&keyOnce, makeKey); int err = pthread_once(&keyOnce, makeKey);
if (err) if (err)
{ {
Firebird::system_call_failed("pthread_once", err); Firebird::system_call_failed::raise("pthread_once", err);
} }
err = pthread_setspecific(key, &key); err = pthread_setspecific(key, &key);
if (err) if (err)
{ {
Firebird::system_call_failed("pthread_setspecific", err); Firebird::system_call_failed::raise("pthread_setspecific", err);
} }
} }
@ -2974,7 +2974,7 @@ public:
{ {
int err = pthread_key_delete(key); int err = pthread_key_delete(key);
if (err) if (err)
Firebird::system_call_failed("pthread_key_delete", err); gds__log("pthread_key_delete failed with error %d", err);
} }
} }
}; };