安全与验证
Solidity reverts on overflow, Rust release builds wrap
Since Solidity 0.8, arithmetic reverts on overflow and underflow. Turning that off takes an explicit unchecked { ... } block.…
Testing a Go channel handoff without sleep
Most handoff tests I run into end with a sleep and a hopeful assertion. This one can do without. A request carries an identif…
partial def is the honest answer for Collatz
Lean has to know a recursive def terminates before it accepts it as a definition. Structural recursion is found automatically…
Why did the compiler delete my signed overflow check?
if (x + 1 < x) on a signed int is not an overflow guard. Signed overflow is undefined behavior in C, so the compiler may assu…
memset before free is a dead store
memset(key, 0, len) followed by free(key) is not a wipe. Nothing reads the buffer again, so the store is dead, and the standa…
Read the axioms of a dependency's theorem before you cite it
A theorem that compiles is not yet a theorem with a proof. sorry closes any goal, and Lean accepts the file with a warning. I…
A typed merge helper still walks into `__proto__`
The settings import uses a small recursive merge. The parameter types look careful, but they only describe what the program e…
Should a Rego allow rule default to false?
{"approved": false} and {} get the same answer from allow if input.approved == true. The answer is undefined, not false. The…
Should the wrapper say NotFound when the step budget runs out?
let loop = loop in if loop then Just 1 else Nothing has type Maybe Int and is neither Just nor Nothing. The type doesn't make…