1032
This commit is contained in:
parent
78ead22797
commit
59d8a872b6
41 changed files with 1073 additions and 17 deletions
|
|
@ -45,3 +45,12 @@ CompileFlags:
|
|||
-e -std=c++23
|
||||
-e -std=c++23
|
||||
-e -std=c++23
|
||||
-e -std=c++23
|
||||
-e -std=c++23
|
||||
-e -std=c++23
|
||||
-e -std=c++23
|
||||
-e -std=c++23
|
||||
-e -std=c++23
|
||||
-e -std=c++23
|
||||
-e -std=c++23
|
||||
-e -std=c++23
|
||||
|
|
|
|||
|
|
@ -7,4 +7,5 @@ Division 2
|
|||
Division 1
|
||||
|
||||
[code]: 0
|
||||
[time]: 5.79357 ms
|
||||
[time]: 20.0531 ms
|
||||
[debug]: true
|
||||
|
|
@ -7,4 +7,4 @@
|
|||
4
|
||||
|
||||
[code]: 0
|
||||
[time]: 2.40207 ms
|
||||
[time]: 2.40207 ms
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ YES
|
|||
YES
|
||||
|
||||
[code]: 0
|
||||
[time]: 6.10971 ms
|
||||
[time]: 6.10971 ms
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
[code]: 0
|
||||
[time]: 4.33087 ms
|
||||
[time]: 2.47264 ms
|
||||
[time]: 2.47264 ms
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@
|
|||
7
|
||||
|
||||
[code]: 0
|
||||
[time]: 2.23374 ms
|
||||
[time]: 2.23374 ms
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@
|
|||
|
||||
|
||||
[code]: 0
|
||||
[time]: 2.32959 ms
|
||||
[time]: 2.32959 ms
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
2
|
||||
4
|
||||
2147483646
|
||||
1073741825
|
||||
==1344370==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
|
||||
|
||||
[code]: 0
|
||||
[time]: 3.09849 ms
|
||||
[code]: 1
|
||||
[time]: 3.08728 ms
|
||||
|
|
@ -25,5 +25,5 @@ compile_source "$SRC" "$DBG_BIN" "$OUTPUT" @debug_flags.txt
|
|||
CODE=$?
|
||||
test $CODE -gt 0 && exit $CODE
|
||||
|
||||
execute_binary "$DBG_BIN" "$INPUT" "$OUTPUT"
|
||||
execute_binary "$DBG_BIN" "$INPUT" "$OUTPUT" true
|
||||
exit $?
|
||||
|
|
|
|||
|
|
@ -4,9 +4,15 @@ execute_binary() {
|
|||
binary="$1"
|
||||
input="$2"
|
||||
output="$3"
|
||||
is_debug="$4"
|
||||
|
||||
start=$(date '+%s.%N')
|
||||
timeout 2s ./"$binary" <"$input" >"$output" 2>&1
|
||||
if [ -n "$is_debug" ]; then
|
||||
asan="$(ldconfig -p | grep libasan.so | head -n1 | awk '{print $4}')"
|
||||
LD_PRELOAD="$asan" timeout 2s ./"$binary" <"$input" >"$output" 2>&1
|
||||
else
|
||||
timeout 2s ./"$binary" <"$input" >"$output" 2>&1
|
||||
fi
|
||||
CODE=$?
|
||||
end=$(date '+%s.%N')
|
||||
truncate -s "$(head -n 1000 "$output" | wc -c)" "$output"
|
||||
|
|
@ -30,6 +36,8 @@ execute_binary() {
|
|||
fi
|
||||
|
||||
printf '\n[time]: %s ms' "$(awk "BEGIN {print ($end - $start) * 1000}")" >>$output
|
||||
test -n "$is_debug" && is_debug_string=true || is_debug_string=false
|
||||
printf '\n[debug]: %s' "$is_debug_string" >>$output
|
||||
return $CODE
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue