Skip to content

Fix #954. safe_memcmp in tinystring. #966

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Fix #954. safe_memcmp in tinystring. #966

wants to merge 1 commit into from

Conversation

kelson42
Copy link
Contributor

This is PR to reintroduce safer memcopy, Unfortunately it seems because of problem with noble (and the compiler) we had to remove it. When all the CI is green (including deb packaging) we could reintroduce it.

See #962

UBSan was complaining about std::memcmp being called with nullptr arguments even when the count == 0. This adds a "safe" wrapper that will just return 0 if the count is 0 or if either of the pointers are nullptr.

UBSan was complaining about std::memcmp being called with nullptr
arguments even when the count == 0. This adds a "safe" wrapper that will
just return 0 if the count is 0 or if either of the pointers are nullptr.
Copy link

codecov bot commented Apr 20, 2025

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 57.55%. Comparing base (ba2600f) to head (3c73608).

Files with missing lines Patch % Lines
src/tools.h 75.00% 0 Missing and 1 partial ⚠️
src/writer/tinyString.h 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #966      +/-   ##
==========================================
+ Coverage   57.53%   57.55%   +0.01%     
==========================================
  Files          99       99              
  Lines        4724     4728       +4     
  Branches     1976     1977       +1     
==========================================
+ Hits         2718     2721       +3     
  Misses        704      704              
- Partials     1302     1303       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants