mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 03:58:20 +00:00
ok, this bug was hard to find.
hyperloglog.h was missing guards and randomly deleting memory at addresses equal to variable contents. I am not entirely sure why that did not crash before...
This commit is contained in:
parent
a37ffab0ea
commit
240d667e30
4 changed files with 17 additions and 12 deletions
|
@ -1,16 +1,19 @@
|
|||
// See the file "COPYING" in the main distribution directory for copyright.
|
||||
|
||||
#ifndef hyperloglog_h
|
||||
#define hyperloglog_h
|
||||
|
||||
#include <stdint.h>
|
||||
#include <opaqueval.h>
|
||||
|
||||
/*
|
||||
* "conf" is how confident the estimate given by the counter is.
|
||||
*
|
||||
* In other words, if the cardinality is estimated to be 100 with 2% error margin and conf is
|
||||
* In other words, if the cardinality is estimated to be 100 with 2% error margin and HLL_CONFis
|
||||
* 0.95, then we are 95% sure that the actual cardinality is between 98 and 102.
|
||||
*/
|
||||
#define conf .95
|
||||
#define HLL_CONF .95
|
||||
|
||||
class CardinalityVal;
|
||||
|
||||
class CardinalityCounter {
|
||||
friend class CardinalityVal;
|
||||
|
@ -114,3 +117,5 @@ class CardinalityCounter {
|
|||
*/
|
||||
uint64_t getM();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue