SShortSingh.
Back to feed

Researcher finds 17 unreported bugs in Clojure core, reproduces five

0
·5 views

A developer used the Lean 4 theorem prover and differential testing against java.util to uncover 17 previously unreported bugs in Clojure's core data structures, which have been in production since 2007. Reproducing five of them on Clojure 1.12.7 and OpenJDK 21, they confirmed the findings in under an hour. One bug, in the vector reduce implementation, causes reduce to loop forever on vectors of exactly 65,505 elements, traced to an incorrect bitmask in the shipped code. The mask has reportedly been present since a 2010 commit, and the author proposed a corrected version verified in Lean. The author also reports a HAMT hash-map bug in which dissoc on hash-collision nodes uses the wrong hash, with the issue appearing for keys that are equal but hash differently.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Keep Email Recovery Blocked for Invalid Recipients Before OTP Fallback in SaaS Login

The article recommends SMS OTP as the primary second factor for construction-site SaaS login, with email OTP recovery allowed only after a durable recipient-suppression check. It argues that verification state and recipient eligibility must be kept separate, so a successful send request never grants access. Suppression should be durable negative evidence about a recipient, independent of short-lived OTP challenges that expire. A recipient classified as definitively invalid must stay ineligible across retries, while transient delivery failures should use a different state to avoid unwarranted access denial. The author also notes that delivery acceptance does not prove the intended person received or verified the code.

0
ProgrammingDEV Community ·

Why IoT Models Fail in Production: Feature Engineering Pitfalls in Sensor Telemetry

A common reason IoT models perform well offline but poorly in deployment is mismatched feature computation between notebooks and gateways, rather than the model itself. The article explains how real telemetry differs from tidy tabular data, with irregular arrival times, data gaps, clock resets, and sensors running at different rates. It compares windowing approaches and recommends sliding windows with a short hop for faster fault detection in alerting. It also presents a gap-aware resampling function that keeps missing intervals as NaN, removes duplicate timestamps, and sorts before resampling. A companion streaming rolling-statistics class is offered so gateway computation matches training-time logic.

0
ProgrammingDEV Community ·

Un bot de cripto necesita 42.7% de aciertos solo para cubrir comisiones en Bitso

Con un take profit de 5% y un stop loss de 1%, la comisión taker de Bitso de 0.78% por operación obliga a que el 42.7% de las operaciones alcancen el objetivo solo para no perder dinero. El cálculo se cobra al comprar y al vender, de modo que con órdenes a mercado el costo ida y vuelta suma 1.56%, y con órdenes límite 1.2%. El autor incluye un código en Python para calcular este punto de equilibrio y una tabla que muestra cómo los objetivos pequeños vuelven imposible la rentabilidad. Su simulador con señales de IA sobre BTC y ETH registró un acierto de dirección cercano al 50%, y con take profit y stop loss el resultado fue negativo, por lo que concluye que no conviene operar.

0
ProgrammingDEV Community ·

Checking Passwords for Breaches in the Browser With Web Crypto and k-Anonymity

A DEV Community author describes a method for checking whether a password appears in data breaches without exposing it. The browser computes a SHA-1 hash of the password locally using the Web Crypto API. Only the first five hash characters are sent to the Pwned Passwords range API, while the remaining suffix is compared on the client side. Because many hashes share each prefix, the server cannot determine which password was checked. The article also recommends keeping password inputs out of analytics and logs, using strict CSP headers, and rotating reused credentials if a match is found.