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

flamenco, vm: syscall err code refactor #3655

Merged
merged 3 commits into from
Dec 6, 2024
Merged

Conversation

ravyu-jump
Copy link
Contributor

@ravyu-jump ravyu-jump commented Dec 6, 2024

README

Highly, HIGHLY recommend reviewing this in individual commits, especially commits 2 and 3. This is a (largely) cosmetic PR, so diffs are going to look horrendous if looked all at once.
For your convenience:

  • Commit 1
    • Renames FD_VM_ERR_SYSCALL* to FD_VM_SYSCALL_ERR* for clarity
    • Convert VM errors emitted in syscall implementations to Syscall errors, potentially creating new, duplicate syscall errors if necessary
    • Cleanup unused errors
    • Update documentation
  • Commit 2
    • Completes error type conversion for syscall-specific macros defined in flamenco/vm/fd_vm_private.h
    • Completes cleanup
  • Commit 3
    • Moves syscall-specific macros in flamenco/vm/fd_vm_private.h to a new file flamenco/vm/syscall/fd_vm_syscall_macros.h
    • Update documentation

Motivation

SIMD-0182* requires us to distinguish syscall errors from non-syscall errors during VM execution. We thus want to have a separate set of error codes for errors that occur inside syscalls, even if they are technically VM errors (i.e., segfaults, compute budget overruns, etc.,).

I also took this opportunity to move certain Syscall-specific VM interfacing macros that were defined in fd_vm_private.h to a new folder within flamenco/vm/syscalls so that the scope of these macros are clearly defined (i.e., to be used within Syscalls only). This clearly delineates where syscall and VM error codes are emitted.

*this is not an implementation of SIMD-0182, rather a pre-requisite

@ravyu-jump ravyu-jump added this pull request to the merge queue Dec 6, 2024
Merged via the queue into main with commit eb0be76 Dec 6, 2024
11 checks passed
@ravyu-jump ravyu-jump deleted the ravyu/syscall-err-refactor branch December 6, 2024 20:42
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