-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df0567c
commit 38e91c0
Showing
9 changed files
with
334 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: run test file | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install dependencies | ||
run: make deps | ||
- name: test | ||
run: | | ||
make test | ||
CODE=$? | ||
if [[ $CODE -eq 74 ]] then | ||
echo ":watch: Test indicated TODO failure." | ||
touch .todo_failure | ||
exit 0 | ||
fi | ||
- name: show files | ||
run: make show | ||
- name: check for leaks | ||
run: | | ||
if test -f .todo_failure; then exit 0; fi | ||
make checkleaks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,29 @@ | ||
#define TINOBSY_DEBUG | ||
#include "pickle.hpp" | ||
|
||
#include <cstdio> | ||
#include <csignal> | ||
|
||
void on_segfault(int signal, siginfo_t* info, void* arg) { | ||
fprintf(stderr, "Segmentation fault at %p\n", info->si_addr); | ||
DBG("Segmentation fault at %p", info->si_addr); | ||
exit(255); | ||
} | ||
|
||
void start_catch_segfault() { | ||
struct sigaction x = { 0 }; | ||
sigemptyset(&x.sa_mask); | ||
x.sa_sigaction = on_segfault; | ||
x.sa_flags = SA_SIGINFO; | ||
sigaction(SIGSEGV, &x, NULL); | ||
} | ||
|
||
int main() { | ||
// compilation test | ||
start_catch_segfault(); | ||
auto vm = new pickle::pickle(); | ||
auto foo = vm->wrap_string("thisWillCauseASyntaxError"); | ||
vm->run_next_thunk(); | ||
printf("hello world\n"); | ||
delete vm; | ||
return 0; | ||
} |
Oops, something went wrong.