<< Back to previous view

[MATCH-69] AOT-compiling match expression produces stack overflow Created: 24/Apr/13  Updated: 16/Jun/13  Resolved: 16/Jun/13

Status: Closed
Project: core.match
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Minor
Reporter: Chas Emerick Assignee: Chas Emerick
Resolution: Declined Votes: 0
Labels: None


 Description   

The offending match expression is pretty gnarly, will try to simplify and post it here later. For now, a (partial) stack trace, eliding the repeating bits:

Caused by: java.lang.StackOverflowError
	at clojure.core$map$fn__4207.invoke(core.clj:2479)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:60)
	at clojure.lang.ChunkedCons.chunkedNext(ChunkedCons.java:59)
	at clojure.lang.ChunkedCons.next(ChunkedCons.java:43)
	at clojure.lang.PersistentVector.create(PersistentVector.java:51)
	at clojure.lang.LazilyPersistentVector.create(LazilyPersistentVector.java:31)
	at clojure.core$vec.invoke(core.clj:354)
	at clojure.core.match.PatternMatrix.column(match.clj:713)
	at clojure.core.match$useful_p_QMARK_.invoke(match.clj:811)
	at clojure.core.match.PatternMatrix$iter__1458__1464$fn__1465$iter__1460__1466$fn__1467$fn__1468.invoke(match.clj:765)
	at clojure.core.match.PatternMatrix$iter__1458__1464$fn__1465$iter__1460__1466$fn__1467.invoke(match.clj:763)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:60)
	at clojure.lang.RT.seq(RT.java:484)
	at clojure.core$seq.invoke(core.clj:133)
	at clojure.core.match.PatternMatrix$iter__1458__1464$fn__1465.invoke(match.clj:764)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:67)
	at clojure.lang.RT.seq(RT.java:484)
	at clojure.core$seq.invoke(core.clj:133)
	at clojure.core$partition$fn__4309.invoke(core.clj:2834)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:60)
	at clojure.lang.RT.seq(RT.java:484)
	at clojure.core$seq.invoke(core.clj:133)
	at clojure.core$map$fn__4207.invoke(core.clj:2479)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:60)
	at clojure.lang.Cons.next(Cons.java:39)
	at clojure.lang.PersistentVector.create(PersistentVector.java:51)
	at clojure.lang.LazilyPersistentVector.create(LazilyPersistentVector.java:31)
	at clojure.core$vec.invoke(core.clj:354)
	at clojure.core.match.PatternMatrix.useful_matrix(match.clj:763)
	at clojure.core.match.PatternMatrix.necessary_column(match.clj:755)
	at clojure.core.match.PatternMatrix$choose_column__1441.invoke(match.clj:720)
	at clojure.core.match.PatternMatrix.compile(match.clj:738)
	at clojure.core.match$first_column_chosen_case$switch_clauses__1406$fn__1407.invoke(match.clj:643)
	at clojure.core$map$fn__4211.invoke(core.clj:2492)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:60)
	at clojure.lang.RT.seq(RT.java:484)
	at clojure.core$seq.invoke(core.clj:133)
	at clojure.core.protocols$seq_reduce.invoke(protocols.clj:30)
	at clojure.core.protocols$fn__6026.invoke(protocols.clj:54)
	at clojure.core.protocols$fn__5979$G__5974__5992.invoke(protocols.clj:13)
	at clojure.core$reduce.invoke(core.clj:6177)
	at clojure.core$into.invoke(core.clj:6229)
	at clojure.core.match$first_column_chosen_case$switch_clauses__1406.invoke(match.clj:646)
	at clojure.core.match$first_column_chosen_case.invoke(match.clj:676)
	at clojure.core.match.PatternMatrix.compile(match.clj:740)
	at clojure.core.match$first_column_chosen_case$switch_clauses__1406$fn__1407.invoke(match.clj:643)
	at clojure.core$map$fn__4211.invoke(core.clj:2492)
	at clojure.lang.LazySeq.sval(LazySeq.java:42)
	at clojure.lang.LazySeq.seq(LazySeq.java:60)
	at clojure.lang.RT.seq(RT.java:484)
	at clojure.core$seq.invoke(core.clj:133)
	at clojure.core.protocols$seq_reduce.invoke(protocols.clj:30)
	at clojure.core.protocols$fn__6026.invoke(protocols.clj:54)
	at clojure.core.protocols$fn__5979$G__5974__5992.invoke(protocols.clj:13)
	at clojure.core$reduce.invoke(core.clj:6177)
	at clojure.core$into.invoke(core.clj:6229)


 Comments   
Comment by David Nolen [ 02/Jun/13 11:39 AM ]

As it is this ticket is not useful. Chas can you add the minimal case? Thanks!

Comment by David Nolen [ 15/Jun/13 10:37 PM ]

Without more details I'm inclined closed to this. I just need a minimal case and will be happy to investigate.

Comment by Chas Emerick [ 16/Jun/13 4:47 PM ]

I never was able to get a sane minimal case together. Later, I just coded around the problem, and all of the changes on master may make the issue moot at this point anyway. Closing.

Generated at Fri Oct 31 21:46:11 CDT 2014 using JIRA 4.4#649-r158309.