FluorineDog opened a new issue #236:
URL: https://github.com/apache/datasketches-cpp/issues/236


   ```c++
   #include <iostream>
   #include <kll_sketch.hpp>
   using namespace datasketches;
   using namespace std;
   
   int main()
   {
       using T = int8_t;
       kll_sketch<T> kll;
       int N = 3;
       kll.update(-8);
       kll.update(-8);
       kll.update(-8);
       
       auto blob = kll.serialize();
       std::cout << "blobsize=" <<  blob.size() << std::endl;
       auto kll2 = kll_sketch<T>::deserialize(blob.data(), blob.size());
       return 0;
   }
   ```
   will lead to 
   
   > libc++abi: terminating with uncaught exception of type std::out_of_range: 
Insufficient buffer size detected: bytes available 29, minimum needed 32
   
   Seems that `ensure_minimum_memory(size, 1ULL << preamble_ints);` in 
`kll_sketch_impl.hpp:578` is incorrect. 
    


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to