1. Mike Miller
  2. pytave
  3. Pull requests

Pull requests

#30 Declined
Repository
Deleted repository
Branch
default (b2fef2e6ca75)
Repository
pytave
Branch
default

Normalise exception before extracting text (fixes issue #32)

Author
  1. Abhinav Tripathi
Reviewers
Description
  • exceptions.cc: Make sure that ptype and pvalue are of same class before trying to extract the text. Fixes crash on python3.

Comments (4)

  1. Abhinav Tripathi author

    Apparently, to increase performance, python does not enforce that ptype and pvalue in any exception be of the same exception class. This can then be enforced using PyErr_NormalizeException which is what is required here.

  2. Mike Miller repo owner

    Thank you, this fix looks right and works for me.

    You missed a space before the argument list. I went ahead and amended this since it's such a small change, tweaked the commit message, and pushed. You can strip b2fef2e on your repository.

    1. Abhinav Tripathi author

      You missed a space before the argument list.

      Oops. Sorry.

      Well, this fixes the crash due to the exception. But are you able to run test pycall.cc succesfully? For me pyeval and pyexec tests are passing. But pycall test is causing segfault! I tried and even pycall ("len", [10 10]) is causing segfault if I use python3...