Skip to content

Commit

Permalink
wip darwin makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
njelich committed Mar 11, 2024
1 parent 7ef5d44 commit 926ac28
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/darwin-x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
rustup install nightly
export PATH=/root/.cargo/bin:$PATH
cargo install cargo-fuzz
- name: Build C tests
run:
- name: Run tests
run: |
cargo test --release --verbose --lib -- --test-threads 1
Expand Down
45 changes: 45 additions & 0 deletions casr/tests/casr_tests/darwin_Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
all: test_returnAv test_segFaultOnPc test_abort test_destAv test_destAvNearNull test_sourceAv test_sourceAvNearNull test_callAv test_callAvTainted test_heapError test_canary test_badInstruction test_safeFunc test_stackOverflow test_destAvTainted test_DivByZero test_sigbus test_sig_me

test_returnAv: test_returnAv.c
gcc -g -O0 -fno-stack-protector test_returnAv.c -o ./arm_bin/test_returnAv
test_segFaultOnPc: test_segFaultOnPc.c
gcc -g -O0 -fno-stack-protector test_segFaultOnPc.c -o ./arm_bin/test_segFaultOnPc
test_abort: test_abort.c
gcc -g -O0 -D_FORTIFY_SOURCE=2 test_abort.c -o ./arm_bin/test_abort
test_destAv: test_destAv.c
gcc -g -O0 test_destAv.c -o ./arm_bin/test_destAv
test_destAvNearNull:
gcc -g test_destAvNearNull.c -o ./arm_bin/test_destAvNearNull
test_sourceAv: test_sourceAv.c
gcc -g test_sourceAv.c -o ./arm_bin/test_sourceAv
test_sourceAvNearNull: test_sourceAvNearNull.c
gcc -g test_sourceAvNearNull.c -o ./arm_bin/test_sourceAvNearNull
test_callAvTainted: test_callAv.c
gcc -g -O0 test_callAv.c -o ./arm_bin/test_callAvTainted
test_callAv: test_callAv.c
gcc -g -O2 test_callAv.c -o ./arm_bin/test_callAv
test_heapError: test_heapError.c
gcc -g -O0 test_heapError.c -o ./arm_bin/test_heapError
test_canary: test_returnAv.c
gcc -g -O0 -fstack-protector-all test_returnAv.c -o ./arm_bin/test_canary
test_safeFunc: test_returnAv.c
gcc -g -O2 test_returnAv.c -o ./arm_bin/test_safeFunc
test_badInstruction: test_badInstruction.c
gcc -O0 ./test_badInstruction.c -o ./arm_bin/test_badInstruction
test_stackOverflow: test_stackOverflow.c
gcc -O0 ./test_stackOverflow.c -o ./arm_bin/./test_stackOverflow
test_destAvTainted: test_destAvTainted.c
gcc -O0 ./test_destAvTainted.c -o ./arm_bin/./test_destAvTainted
test_DivByZero:
gcc -g test_DivByZero.c -o ./arm_bin/test_DivByZero
test_sigbus:
gcc -g test_sigbus.c -o ./arm_bin/test_sigbus
test_sig_me:
gcc -g test_sig_me.c -o ./arm_bin/test_sig_me

clean:
cd arm_bin && rm -f test_stackOverflow \
test_badInstruction test_safeFunc test_returnAv test_segFaultOnPc \
test_abort test_destAv test_destAvNearNull test_sourceAv \
test_sourceAvNearNull test_callAv test_heapError \
test_canary test_callAvTainted test_DivByZero test_destAvTainted

0 comments on commit 926ac28

Please sign in to comment.