leerho commented on PR #578:
URL: https://github.com/apache/datasketches-cpp/pull/578#issuecomment-6928824509

   @P92Z thanks for taking on the `allocate(0)` update. Just checking in, since 
we'd like to get this into the next minor release.
   
   As far as I can see, `allocate(0)` can only be reached from the two 
`deserialize` paths (stream and bytes): a non-empty image with `num_longs == 0` 
goes straight to `allocate(num_bytes)` with 0. The constructor already rejects 
0 bits, and an empty image goes through the constructor too. So rejecting 
`num_longs == 0` for a non-empty image with `std::invalid_argument`, in both 
paths, plus a test for each, should cover it. A filter with 0 capacity then 
can't exist, so the copy constructor is covered as well.
   
   The branch also conflicts with master now, because #580 changed the stream 
`deserialize` next to one of the removed checks. Once the update is in, we'll 
take care of the rebase, as we said. If you're busy, we're also happy to push 
the fix to your branch ourselves (maintainer edits are enabled) and you can 
review it. Just let us know which you'd prefer.
   
   Thanks again for this.
   


-- 
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