Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numpy usage causes Ghidra to crash #17

Closed
mike-hunhoff opened this issue Nov 4, 2022 · 2 comments · Fixed by #41
Closed

numpy usage causes Ghidra to crash #17

mike-hunhoff opened this issue Nov 4, 2022 · 2 comments · Fixed by #41
Labels
bug Something isn't working
Milestone

Comments

@mike-hunhoff
Copy link
Collaborator

This is likely a result of Ghidrathon's use of Jep's SubInterpreter v. SharedInterpreter (see Jep discussion here).

We could:

  1. change Ghidrathon to use Jep's SharedInterpreter
  2. continue using SubInterpreter but include numpy in the list of shared modules in the JepConfig, as suggested by Jep developers

Additional discussion from Jep developers on which interpreter to use:

Use SharedInterpreters if
- you are brand new to Jep and are not sure. It is easier to go from using SharedInterpreters to SubInterpreters than the other way around.
- you want to use a lot of CPython extension modules
Use SubInterpreters if
- you used Jep instances in Jep 3.x and want to retain the same behavior
- you need your interpreters as isolated as possible

@mike-hunhoff mike-hunhoff added the bug Something isn't working label Nov 4, 2022
@IdanH101
Copy link

IdanH101 commented Nov 5, 2022

Appreciated! Please let me know if there is a progress in that area.
(Following the discussion in #14)

@mike-hunhoff
Copy link
Collaborator Author

Relevant JepConfig methods to add shared modules:

https://github.com/ninia/jep/blob/b926ca4af1df7a496ea0a8cb7d030bbe310de898/src/main/java/jep/JepConfig.java#L153-L189

We need to consider that any CPython module could have issues when executed in a subinterpreter and weigh this risk against the isolation benefits provided by Jep's SubInterpreter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants