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

Python run_method API segfaults if given non-existent method #5648

Closed
swolchok opened this issue Sep 25, 2024 · 4 comments
Closed

Python run_method API segfaults if given non-existent method #5648

swolchok opened this issue Sep 25, 2024 · 4 comments
Assignees
Labels
enhancement Not as big of a feature, but technically not a bug. Should be easy to fix module: extension Related to extension built on top of runtime, e.g. pybindings, data loader, etc. triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@swolchok
Copy link
Contributor

🐛 Describe the bug

Repro:

  1. install executorch with ./install_requirements.sh --pybind
>>> from executorch.extension.pybindings import portable_lib as exec_lib
>>> mod = exec_lib._load_for_executorch("some.pte")
>>> mod.run_method("idontexist")
fish: Job 1, 'python' terminated by signal SIGSEGV (Address boundary error)

Versions

latest executorch main, commit hash cd46721

@Olivia-liu Olivia-liu added bug Something isn't working module: extension Related to extension built on top of runtime, e.g. pybindings, data loader, etc. enhancement Not as big of a feature, but technically not a bug. Should be easy to fix and removed bug Something isn't working labels Sep 26, 2024
@dbort dbort added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Sep 26, 2024
@Olivia-liu
Copy link
Contributor

@JacobSzwejbka @dbort Iiuc, this is an ask for better error handling when the user tries to run a method that doesn't exist.

@dbort
Copy link
Contributor

dbort commented Sep 26, 2024

We should definitely throw a python exception instead of segfaulting.

@JacobSzwejbka
Copy link
Contributor

Looking

@JacobSzwejbka
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Not as big of a feature, but technically not a bug. Should be easy to fix module: extension Related to extension built on top of runtime, e.g. pybindings, data loader, etc. triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants