Code scope causes segfault

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Linux
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If the scope passed to the code class has an object like a collection it causes a segfault during the db.eval.

      This is an example code,

      db.eval(Code("my code", scope=

      {"collection" : my_collection }

      )

      which is worng because it should be

      db.eval(Code("my code", scope=

      {"collection" : my_collection.name }

      )

      The thing is that the first code should raise an InvalidDocument instead of going in segfault.

            Assignee:
            Michael Dirolf (Inactive)
            Reporter:
            Flavio Percoco
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: