threatgrid / asami

A graph store for Clojure and ClojureScript
Eclipse Public License 1.0
634 stars 29 forks source link

StackOverflow during transitive paths over unbound attributes #211

Open quoll opened 3 years ago

quoll commented 3 years ago

The following causes the reduce function in asami.common-index/*stream-from to lead to a stack overflow when given the included data.

(asami/q
         '[:find ?uuid ?observable ?indicator
           :in $ ?uuid
           :where
           [?resolve :uuid ?uuid]
           [?resolve :result ?bundle]
           [?bundle :indicators ?indicators]
           [?indicators :tg/contains ?indicator]
           [?indicator :id ?indicator-id]
           [?investigate :type "investigate"]
           [?investigate :arg ?observable]
           [?investigate ?whatever+ ?relationship]
           [?relationship :target_ref ?indicator-id]]
         (asami/connect db-uri)
         "f038d6ca-82cf-40a6-8626-6910da11cbce")

asami.data.gz