Skip to content

Conversation

@prestwich
Copy link
Collaborator

Closes #550
Supersedes #551
Addresses rustsec/advisory-db#2538

Solution

Review safety of unstable crate API functions. Ensure that functions with COUs that may result in UB are marked as unsafe, and have clear COU documentation

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

@prestwich prestwich self-assigned this Dec 25, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 25, 2025

CodSpeed Performance Report

Merging #552 will degrade performance by 25.91%

Comparing prestwich/rustsec-safety (51fdde2) with main (17c9b3e)

Summary

⚡ 8 improvements
❌ 14 regressions
✅ 364 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Efficiency
div_rem/4096/2048 686 µs 609.5 µs +12.55%
fmt/binary/128 7.3 ms 6.6 ms +10.48%
log/128 8.8 ms 7.4 ms +18.88%
log/192 11.8 ms 14 ms -15.65%
log/256 14.4 ms 16.5 ms -13.15%
log/384 21.1 ms 24 ms -12.02%
fmt/hex/128 3 ms 2.4 ms +26.18%
fmt/hex/64 1.5 ms 1.4 ms +12.29%
most_significant_bits/4096/4096 29 µs 26 µs +11.51%
overflowing_pow/256 2 ms 2.5 ms -20.55%
overflowing_pow/192 1.1 ms 1.5 ms -25.91%
overflowing_pow/128 534.8 µs 460.4 µs +16.16%
overflowing_pow/512 9 ms 10.4 ms -13.18%
overflowing_pow/4096 1.8 ms 2.2 ms -20.99%
overflowing_pow/384 4.5 ms 5.4 ms -17.22%
pow/4096 2.2 ms 2 ms +10.49%
root/127/192/192 15.7 ms 18.6 ms -15.63%
root/127/512/512 27.7 ms 32.5 ms -14.63%
root/127/256/256 11.9 ms 13.6 ms -12.77%
root/127/384/384 13.7 ms 15.4 ms -11.28%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@prestwich
Copy link
Collaborator Author

cc @DaniPopes in case you want to look into why benches have changed

@DaniPopes
Copy link
Contributor

Likely due to new Rust stable version, I also saw this on a CI change not that long ago

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.

Unsoundness of safe reciprocal_mg10

3 participants