torch/torch7 — pull request #55 by jameskirkpatrick (2014-07-11 09:42:59+00:00)
Title: Fixed serializing/deserializing of closures

1. The upvalue detection could get caught in an infinite
loop in cases when the upvalue was nil.
2. Closures that contained themselves as upvalues caused
another infinite loop that would end in stack overflow.
Such closures are common, as that is how lua implements
recursive local functions.