mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-12 17:48:33 +00:00
Move 8051 test into db/tools/rasm2 and fix null deref in asm ##asm
This commit is contained in:
parent
04ee6f377e
commit
0693e54354
@ -667,7 +667,9 @@ static int print_assembly_output(RAsmState *as, const char *buf, ut64 offset, ut
|
||||
if (rad) {
|
||||
printf ("f entry = $$\n");
|
||||
printf ("f label.main = $$ + 1\n");
|
||||
ht_pp_foreach (as->a->flags, print_label, NULL);
|
||||
if (as->a->flags) {
|
||||
ht_pp_foreach (as->a->flags, print_label, NULL);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
all: r2r-tests unit_tests test-8051-reassembly
|
||||
all: r2r-tests unit_tests
|
||||
|
||||
arm.v35:
|
||||
${RUNTEST} db/extras/asm/arm.v35_64
|
||||
@ -17,9 +17,6 @@ RUNTEST=r2r -L -o results.json
|
||||
r2r-tests: bins
|
||||
${RUNTEST}
|
||||
|
||||
test-8051-reassembly:
|
||||
$(SHELL) ./test-8051-reassembly.sh
|
||||
|
||||
fuzz-tests: bins
|
||||
r2r -LF bins/fuzzed @fuzz
|
||||
|
||||
|
@ -1,3 +1,14 @@
|
||||
NAME=test 8051 reassembly
|
||||
FILE=--
|
||||
CMDS=!scripts/test-8051-reassembly.sh
|
||||
EXPECT=<<EOF
|
||||
Reassembling 8051... OK
|
||||
EOF
|
||||
EXPECT_ERR=<<EOF
|
||||
Warning: using oba to load the syminfo from different mapaddress.
|
||||
EOF
|
||||
RUN
|
||||
|
||||
NAME=rasm2 binary input
|
||||
FILE=-
|
||||
ARGS=-a arm -b 64
|
||||
|
1
test/test-8051-reassembly.sh → test/scripts/test-8051-reassembly.sh
Normal file → Executable file
1
test/test-8051-reassembly.sh → test/scripts/test-8051-reassembly.sh
Normal file → Executable file
@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
BUILD_DIRECTORY=$(mktemp -d tmp.XXXXXXXXXX)
|
||||
[ -z "$BUILD_DIRECTORY" ] && exit 1
|
||||
export EXIT_CODE=0
|
@ -3,6 +3,6 @@
|
||||
r2 -N -e http.port=9393 -qq -c=h bins/elf/arg > /dev/null 2>&1 &
|
||||
CHILD=$!
|
||||
curl -s --retry 30 --retry-delay 1 --retry-connrefused http://127.0.0.1:9393/ > /dev/null 2>&1
|
||||
r2 -N -qc '=0 pd 10' -C http://127.0.0.1:9393/cmd
|
||||
r2 -N -qc '=0 pd 10@e:asm.cmt.right=false' -C http://127.0.0.1:9393/cmd
|
||||
r2 -N -c 'b $s;pr~:0..11' -qcq http://127.0.0.1:9393/
|
||||
kill $CHILD
|
||||
|
Loading…
x
Reference in New Issue
Block a user