All lessons · Rust scripts and ckb-std · Start here · Glossary
Disable overflow checks for ckb-std when using its dummy-atomic polyfillsAdvancedFrom one fix
From one fix · Check: partly right · Checked 2026-11-19
When a release profile sets overflow-checks = true and ckb-std (here =1.1.0 with the dummy-atomic feature) supplies the single-thread __atomic polyfills, add a per-package override turning overflow checks off for ckb-std. Atomic read/modify/write arithmetic is defined to wrap, so checked arithmetic in those polyfills would panic instead of wrapping.
Why it matters: With workspace-wide overflow checks, wrapping atomic arithmetic inside ckb-std's polyfills could trap instead of wrapping and abort the guest.
Pattern
[profile.release.package.ckb-std] overflow-checks = falseTaken from the commit, shortened.
A test changed in the same commit
It sits next to the fix. We did not run it.
- CellScript-Labs/AgoraSeal:
crates/protocol/tests/replay.rs
- Concepts
- Other
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-10-07
- Last changed
- 2026-10-07
- Last checked
- 2026-11-19
- Check against the commit
- partly right: a true core, with a part that is loose or too wide
Sources (1)
- 2026-10-07 · CellScript-Labs/AgoraSeal · more from this project
More about Rust scripts and ckb-std
- Enable molecule bytes_vec so ckb-std scripts contain no atomic instructions
- CKB VM2 READ and INHERITED_FDS syscalls take a length pointer and return status in a0
- Close spawn pipe descriptors when an IPC channel is freed
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Disable overflow checks for ckb-std when using its dummy-atomic polyfills", CKB lessons, https://pulse.lusocryptolabs.com/learned/scripts/disable-overflow-checks-for-ckb-std-when-using-its-dummy-ato, CC BY 4.0, last changed 2026-10-07.