TL;DR
Naoya Yamashita says checks of Clojure 1.12.7 found 17 bugs that he could not locate in Clojure’s Jira or ask.clojure.org. The reported issues include a reduction that can loop indefinitely on large primitive vectors and a hash-map collision-node defect; the findings have not been independently confirmed in the supplied material.
Developer Naoya Yamashita says he found 17 previously unlisted bugs while checking parts of Clojure’s core with Lean 4 and differential tests. The reported defects include a reduction that can fail to finish on a large primitive vector and a hash-map collision-node problem; Yamashita says he could not find matching reports in Clojure’s Jira or ask.clojure.org.
Prime made for students and young adults
- Fast, free delivery for dorm and study essentials
- Prime Video and Amazon Music included
- Member-only deals
Yamashita’s report says he tested Clojure 1.12.7, released November 18, 2026, using JDK 21. For small functions involving integer and bit arithmetic, he modeled the implementation and a wider-arithmetic specification in Lean 4, then used its bit-vector decision procedure to search for counterexamples. He says each counterexample was converted into a Clojure input and reproduced against the original code.
For larger persistent data structures, which he says were not suitable for the same small-function proof method, Yamashita used differential testing against Java collections. For HAMTs, he reports applying 1,500 operations across each of 2,000 seeds and comparing results with java.util.HashMap. For vectors, he compared operations with ArrayList near points where the vector tree gains a level. He reports no mismatches in those tested HAMT operations or at the vector boundaries.
One example concerns reduce on vector-of, a vector implementation backed by primitive arrays. Yamashita reports that reducing a sequence made by dropping the first element from a vector-of with at least 65,505 elements can fail to return. He traces the behavior to a mask in the chunk-advance calculation: at the boundary, it clears higher bits as well as the lowest five, sending the next chunk index back to zero. A normal vector of the same size returned a sum in his example.
Potential Effects on Clojure Programs
The reported findings matter because they concern core collection behavior used by Clojure programs, rather than an isolated application. If the vector-of case is reproducible as described, code that reduces sufficiently large instances may not complete. A separate reported issue involves hash-map equality and hashing, operations that affect whether collections find and remove keys as expected.
The report also illustrates what formal tools can and cannot establish in this testing approach. Yamashita used Lean to check narrow arithmetic properties and differential testing for broader collection behavior. Those methods can expose counterexamples in tested cases, but the report alone does not establish that every reported issue affects typical workloads, nor that the entire Clojure core has been exhaustively verified.
Popular right now

Vitamix 5200 Professional-Grade Blender with 64 oz Container, Black

Roborock Q7 L5 Robot Vacuum and Mop Combo, 8,000 Pa Suction

Vitamix 5-Speed Immersion Blender, 625-Watt, Stainless Steel/Black
As an affiliate, we earn on qualifying purchases.
How the Checks Were Run
Yamashita says he began after reading an account by Koukyosyumei about porting Rust open-source projects into Lean 4 and finding bugs when proofs failed. He then applied the hirosassa/lean-verify procedure to Java-written portions of Clojure’s core, modeling Java integer types as fixed-width bit vectors to represent overflow and related operations.
The report describes two distinct methods. Lean was used for small arithmetic functions, with a property written against a simpler specification. For large collections, the author instead compared outputs after applying matching operation sequences to Clojure and Java data structures. He says he searched Jira through its REST API and searched ask.clojure.org, but found no matching reports. That search is the basis for describing the findings as unlisted; it does not prove that no one had previously noticed them.
The report’s HAMT example concerns a HashCollisionNode, which stores keys that have identical hashes and checks keys for equality. Yamashita says its removal code passes the hash of the key supplied to dissoc into the replacement node, rather than retaining the node’s original hash. He notes that a Clojure vector can compare equal to a Java ArrayList with the same elements even though their hashes differ, and cites CLJ-1372 for that mismatch.
Reproduction and Project Response
The supplied report does not include independent reproductions, maintainer responses, or confirmation that fixes have been accepted. It also does not provide details for all 17 findings in the source material provided here; the vector-of and HAMT examples are described, but the full set of affected functions and severity is not established.
Yamashita says he found no matching entries in Jira or ask.clojure.org. That does not rule out reports elsewhere or issues that have been noticed but not filed. The differential tests also cover specified operation sequences and boundary values; the reported absence of mismatches should not be read as proof that all HAMT or vector behaviors are correct.
Maintainer Review and Fixes
The next step is for Clojure maintainers or other developers to reproduce the cases, assess their impact, and determine whether code changes or issue reports are needed. The supplied material does not state that fixes have been submitted, accepted, or released. Readers tracking the findings will need to look for follow-up discussion in Clojure’s issue channels and for changes in later releases.
Key Questions
What did Yamashita report finding?
He reports 17 bugs in parts of Clojure’s core that he could not locate in Jira or ask.clojure.org. The supplied details focus on reduction of large vector-of values and removal from a HAMT hash-collision node.
What happens with the reported vector-of issue?
According to Yamashita, reducing a sequence made by dropping one element from a vector-of containing at least 65,505 elements can fail to finish. He attributes this to a chunk-index mask that can reset the index to zero.
Did Lean prove that Clojure has 17 bugs?
No. Yamashita says he used Lean to find counterexamples for small arithmetic functions and then reproduced them in Clojure. He used differential testing for larger collections. The number 17 is the author’s reported finding, not an independent audit result in the supplied material.
Were the reported issues fixed?
The source material does not say whether maintainers have confirmed the findings or released fixes. The status of fixes and project response remains unclear.
Source: s.conao3.com
