Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Not A Problem
-
3.3.1
-
None
-
None
-
Mac OS X 10.6.5
Description
Code using the C client assumes that watcher callbacks are called exactly once. If the watcher is called more than once, the process will likely overwrite freed memory and/or crash.
collect_session_watchers (zk_hashtable.c) gathers watchers from active_node_watchers, active_exist_watchers, and active_child_watchers without removing them. This results in watchers being invoked more than once.
Test code is attached that reproduces the bug, along with a proposed patch.
Attachments
Attachments
Issue Links
- duplicates
-
ZOOKEEPER-888 c-client / zkpython: Double free corruption on node watcher
- Closed