CKB Pulse

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

Prefer
[profile.release.package.ckb-std] overflow-checks = false

Taken from the commit, shortened.

A test changed in the same commit

It sits next to the fix. We did not run it.

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)

More about Rust scripts and ckb-std

All 35 in this topic

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.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.