You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by "MaheshGPai (via GitHub)" <gi...@apache.org> on 2026/01/27 07:49:33 UTC

[I] BUG: SIGABRT in quantiles_sketch::deserialize(): dereferencing empty std::optional (libc++ verbose_abort) [datasketches-cpp]

MaheshGPai opened a new issue, #477:
URL: https://github.com/apache/datasketches-cpp/issues/477

   
   Some deserialization paths use `std::optional<T> tmp;` as if it were “allocated but uninitialized storage” and then pass `&*tmp` to `serde::deserialize(...)`. When `tmp` is disengaged, `operator*` is undefined behavior; with libc++ hardening enabled it triggers an assertion and aborts the process (SIGABRT).
   
   This results in **process termination** instead of a normal error (exception) when deserializing malformed/short buffers (and potentially other edge cases).
   
   ## Expected behavior
   
   Deserialization should either:
   - succeed, or
   - throw/return a normal error (e.g. `std::invalid_argument`, `std::runtime_error`)
   
   It should **not** abort the process.
   
   ## Actual behavior
   
   With libc++ hardening enabled, the process aborts with:
   
   - `optional operator* called on a disengaged value`
   - `Abort trap: 6` / SIGABRT
   
   The abort points to `std::optional<T>::operator*` used on an empty optional.


-- 
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: commits-unsubscribe@datasketches.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


Re: [I] BUG: SIGABRT in quantiles_sketch::deserialize(): dereferencing empty std::optional (libc++ verbose_abort) [datasketches-cpp]

Posted by "leerho (via GitHub)" <gi...@apache.org>.
leerho closed issue #477: BUG: SIGABRT in quantiles_sketch::deserialize(): dereferencing empty std::optional (libc++ verbose_abort)
URL: https://github.com/apache/datasketches-cpp/issues/477


-- 
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: commits-unsubscribe@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org