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

Kill std::panic::set_hook() and std::panic::take_hook()? #27

Open
eeeebbbbrrrr opened this issue Feb 16, 2023 · 4 comments
Open

Kill std::panic::set_hook() and std::panic::take_hook()? #27

eeeebbbbrrrr opened this issue Feb 16, 2023 · 4 comments
Assignees

Comments

@eeeebbbbrrrr
Copy link

It's unclear to me what those mean in the context of plrust, a pgx-based extension that installs its own panic handler, then dynamically loading a user function, also written in rust, that doesn't install its own language handler.

@eeeebbbbrrrr eeeebbbbrrrr changed the title Kill std::panic::set_hook() and std::panic::take_hook()`? Kill std::panic::set_hook() and std::panic::take_hook()? Feb 16, 2023
@workingjubilee
Copy link
Contributor

@eeeebbbbrrrr
Copy link
Author

That code isn't included in plrust user functions. Only in plrust proper

@workingjubilee
Copy link
Contributor

...hmm. That makes me more worried about how this would work rather than less, but fair.

@thomcc
Copy link
Contributor

thomcc commented Feb 23, 2023

That should be fine, the cdylib environment is entirely sealed off — it has it's own set of globals and everything. (The panic handler is using hidden symbols so they don't exist outside)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants