Commit 71e50b4
committed
Bug#37300558 segmentation fault in Ndb_cluster_connection Dtor
Problem:
Ndb_cluster_connection destructor calls g_eventLogger::stopAsync()
in order to release the buffers used by the async log mechanism as
well as to stop the threads responsible for the async logging.
Problem is that, if g_eventLogger object is deleted before the
destructor of the Ndb_cluster_connection is called, program crash
because it is trying to use a method on a null object.
This can happen in two different ways:
1- Api programs deletes the logger object before deleting the
Ndb_cluster_connection
2- ndb_end() is called before Ndb_cluster_connection is deleted.
Solution:
In cluster_connection Destructor do not call stopAsync() when
g_eventLogger object is NULL.
A warning is also added to inform API users that g_eventLogger
is *wrongly* deleted before cluster_connection Dtor is called.
Change-Id: I57ff648949a60b45841e8b568030259f1540180b1 parent 8a21a5a commit 71e50b4
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
616 | | - | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
617 | 624 | | |
618 | 625 | | |
619 | 626 | | |
| |||
0 commit comments