Fork me on GitHub
#clojure-spec
<
2017-07-15
>
arohner20:07:59

here’s a fun crash-the-process bug:

(s/fdef clojure.core/hash-map :args (s/* (s/cat :k any? :v any?)) :ret map?)(clojure.spec.test.alpha/instrument) 

arohner20:07:31

hrm,

(clojure.spec.test.alpha/check 'clojure.core/hash-map)
also throws OOME, on a -Xmx1024m JVM

joshjones22:07:17

I can replicate the instrument stack overflow -- however, for the check, it's just creating huge maps. So, best to run check with some constraints IMO usually:

(stest/check `hash-map {:clojure.spec.test.check/opts {:num-tests 500 :max-size 30}})