AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 18 Bitcoin

Explicitly don't support ficticious architectures

Public commit record

What the developer wrote

Authored by Martin Habovstiak

68/100 · Adequate
Explicitly don't support ficticious architectures

Currently, no architecture with `usize` exists in stable or unstable
Rust or anywhere in the world that I (or ChatGPT) know of. Notably,
CHERI has 128 bit **pointers**, but **not** `usize`, which is still 64
bits.

Rather then producing garbage on such platforms it is much cleaner to
flat out not support them. This makes reviews easier to reason about and
removes the WTF factor. And while this appears breaking, it really isn't
becuase since no such platforms exist, nobody could've realied on this
behavior.

If such platforms ever arrive, this crate will be most likely EOL for
millenia but even then there exists upgrade path:

1. release 2.0 which has the `new` method behind a feature flag, off by
default
2. semver-trick the entire 2.0 with `*` import and the feature forced on
3. add `try_new` method that returns `Result`

Then downstream crates that want to support crazy-wide architecture will
just upgrade to 2.0 with the feature deactivated and use the new method.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit removes a fallback for extremely unusual (and currently non-existent) computer architectures where a memory-size value might be larger than 64 bits. On such hypothetical platforms, the old code would quietly cap the value at the maximum 64-bit number. The new code instead refuses to compile/run on those platforms, because none exist today. For every real platform, the behavior is unchanged.

Recommended action

No urgent action needed. Treat as a minor hardening/cleanup change. Reviewers should confirm that downstream callers do not rely on saturation behavior, though no real platform triggers it.

Security signals we found

01

Silent saturation of out-of-range length values replaced with explicit unsupported-platform assertion

02

Defensive hardening against hypothetical integer-width mismatch

03

No existing real architecture is affected

Risk score

Why this scored 18/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 2/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.