Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Major
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Patch:Code
Description
reader/read and edn/read call themselves recursively for several encountered character classes - whitespace, comments.
This is high-risk for stack overflow, especially for machine-generated data.
Motivating Use Case: cljs files generated via cljx are particularly prone to trigger tools.reader stack overflow errors. Cljx replaces un-included forms with homomorphic whitespace blocks to preserve line number and column errors on compilation.
Fixed: https://github.com/clojure/tools.reader/commit/01b53cb61b586e78cf3f70f12ba2adbbdb7abb25
Thanks, I took the liberty of changing the commit description.