Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
struct hist API: Fix possible crashes; Improve API
Commit a74fff1 introduced a race condition on this logic: lock_get(&sh->shlist->wlock); sh_unref_unsafe(sh); lock_release(&sh->shlist->wlock); , where "sh" must no longer be read following the unref operation. This commit fixes this issue, along with: * fix crash with -DSTRUCT_HIST but no -DDBG_TCPCON * speed optimizations: eliminate memset() operations (not needed) * make sh_push() more flexible (extra ref counts from outside) * code: hide structs, so importing struct_hist.h doesn't conflict with mysql.h's own "struct list_head" (cherry picked from commit 0db9467)
- Loading branch information
1 parent
51d6fa7
commit d9b0102
Showing
3 changed files
with
69 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters