Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-118

Code scope causes segfault

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

      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:
            mike Michael Dirolf
            Reporter:
            flaper87 Flavio Percoco
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: