You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With clang-10 default set of UBSAN checks, the following gets triggered: /usr/include/boost/xpressive/detail/utility/sequence_stack.hpp:217:21: runtime error: applying non-zero offset 4 to null pointer
216,220c216,217
< // Advance the high-water mark
< this->curr_ += count;
<
< // Check to see if we have overflowed this buffer
< if(std::less<void*>()(this->end_, this->curr_))
---
> // Check to see if we would overflow this buffer
> if((nullptr == ptr) || (std::less<void*>()(this->end_, ptr + count)))
222,224d218
< // oops, back this out.
< this->curr_ = ptr;
<
227a222,224
>
> // Advance the high-water mark
> this->curr_ += count;
Apologies, I couldn't find where the CI output for boost.org is published to see if this shows up in existing tests.
Reproducer attached: sequence_stack_ubsan.zip
The text was updated successfully, but these errors were encountered:
With clang-10 default set of UBSAN checks, the following gets triggered:
/usr/include/boost/xpressive/detail/utility/sequence_stack.hpp:217:21: runtime error: applying non-zero offset 4 to null pointer
The following patch avoids the sanitizer error:
Apologies, I couldn't find where the CI output for boost.org is published to see if this shows up in existing tests.
Reproducer attached:
sequence_stack_ubsan.zip
The text was updated successfully, but these errors were encountered: