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

Add --unsafe mode, add barebone safe mode to LLDB/GDB. #46

Merged
merged 3 commits into from
Sep 1, 2024
Merged

Conversation

nicovank
Copy link
Collaborator

@nicovank nicovank commented Sep 1, 2024

I had bigger ideas for this, but let's keep it simple for time constraints. I may change it in the future.

For now, a very restrictive safe mode: only a few no-side-effects functions allowed, plus print only allowing [a-zA-Z0-9_ *].

Added the --unsafe flag for all 3 debuggers to disable any security.

I had bigger ideas for this, but let's keep it simple for time constraints. I may change it in the future.

For now, a very restrictive safe mode: only a few no-side-effects functions allowed, plus print only allowing `[a-zA-Z0-9_ *]`.

Added the `--unsafe` flag for all 3 debuggers to disable any security.
Put call to _getval inside try block for consistency: we catch and report the same errors regardless of whether we're sanitizing calls.
Revert `line[0]` back to `line[:1]`.  The former crashes on an empty line; the latter is the empty string.  Could refactor but don't want to make unnecessary changes...
@stephenfreund stephenfreund merged commit 5886882 into main Sep 1, 2024
10 checks passed
@nicovank nicovank deleted the pr46 branch September 1, 2024 22:38
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

Successfully merging this pull request may close these issues.

2 participants