diff options
Diffstat (limited to 'tests')
82 files changed, 2296 insertions, 0 deletions
diff --git a/tests/fuzzing/bc_afl.yaml b/tests/fuzzing/bc_afl.yaml new file mode 100644 index 000000000000..7d13bff95824 --- /dev/null +++ b/tests/fuzzing/bc_afl.yaml @@ -0,0 +1,125 @@ +session_name: bc_afl + +windows: + - window_name: control + layout: even-horizontal + panes: + - shell_command: + - echo core | doas tee /proc/sys/kernel/core_pattern + - echo performance | doas tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + - rm -rf tests/fuzzing/bc_outputs1/ + - rm -rf tests/fuzzing/bc_outputs2/ + - rm -rf tests/fuzzing/bc_outputs3/ + - rm -rf tests/fuzzing/dc_outputs/ + - window_name: bc11 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 15 + - afl-fuzz -i tests/fuzzing/bc_inputs1 -o tests/fuzzing/bc_outputs1 -p exploit -D -M bc11 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc12 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 16 + - afl-fuzz -i tests/fuzzing/bc_inputs1 -o tests/fuzzing/bc_outputs1 -p coe -S bc12 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc13 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 17 + - afl-fuzz -i tests/fuzzing/bc_inputs1 -o tests/fuzzing/bc_outputs1 -p fast -S bc13 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc14 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 18 + - afl-fuzz -i tests/fuzzing/bc_inputs1 -o tests/fuzzing/bc_outputs1 -p explore -S bc14 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc21 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 19 + - afl-fuzz -i tests/fuzzing/bc_inputs2 -o tests/fuzzing/bc_outputs2 -p exploit -D -M bc21 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc22 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 20 + - afl-fuzz -i tests/fuzzing/bc_inputs2 -o tests/fuzzing/bc_outputs2 -p coe -S bc22 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc23 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 21 + - afl-fuzz -i tests/fuzzing/bc_inputs2 -o tests/fuzzing/bc_outputs2 -p fast -S bc23 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc24 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 22 + - afl-fuzz -i tests/fuzzing/bc_inputs2 -o tests/fuzzing/bc_outputs2 -p explore -S bc24 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc31 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 23 + - afl-fuzz -i tests/fuzzing/bc_inputs3 -o tests/fuzzing/bc_outputs3 -p exploit -D -M bc31 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc32 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 24 + - afl-fuzz -i tests/fuzzing/bc_inputs3 -o tests/fuzzing/bc_outputs3 -p coe -S bc32 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc33 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 25 + - afl-fuzz -i tests/fuzzing/bc_inputs3 -o tests/fuzzing/bc_outputs3 -p fast -S bc33 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc34 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 26 + - afl-fuzz -i tests/fuzzing/bc_inputs3 -o tests/fuzzing/bc_outputs3 -p explore -S bc34 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: dc11 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 27 + - afl-fuzz -i tests/fuzzing/dc_inputs -o tests/fuzzing/dc_outputs -p exploit -D -M dc11 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- + - window_name: dc12 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 28 + - afl-fuzz -i tests/fuzzing/dc_inputs -o tests/fuzzing/dc_outputs -p coe -S dc12 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- + - window_name: dc13 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 29 + - afl-fuzz -i tests/fuzzing/dc_inputs -o tests/fuzzing/dc_outputs -p fast -S dc13 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- + - window_name: dc14 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 30 + - afl-fuzz -i tests/fuzzing/dc_inputs -o tests/fuzzing/dc_outputs -p explore -S dc14 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- diff --git a/tests/fuzzing/bc_afl_continue.yaml b/tests/fuzzing/bc_afl_continue.yaml new file mode 100644 index 000000000000..486984bdaef5 --- /dev/null +++ b/tests/fuzzing/bc_afl_continue.yaml @@ -0,0 +1,122 @@ +session_name: bc_afl_continue +start_directory: ./ + +windows: + - window_name: control + layout: even-horizontal + panes: + - shell_command: + - echo core | doas tee /proc/sys/kernel/core_pattern + - echo performance | doas tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + - window_name: bc11 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 4 + - afl-fuzz -i- -o tests/fuzzing/bc_outputs1 -p exploit -D -M bc11 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc12 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 5 + - afl-fuzz -i- -o tests/fuzzing/bc_outputs1 -p coe -S bc12 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc13 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 6 + - afl-fuzz -i- -o tests/fuzzing/bc_outputs1 -p fast -S bc13 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc14 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 7 + - afl-fuzz -i- -o tests/fuzzing/bc_outputs1 -p explore -S bc14 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc21 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 8 + - afl-fuzz -i- -o tests/fuzzing/bc_outputs2 -p exploit -D -M bc21 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc22 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 9 + - afl-fuzz -i- -o tests/fuzzing/bc_outputs2 -p coe -S bc22 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc23 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 10 + - afl-fuzz -i- -o tests/fuzzing/bc_outputs2 -p fast -S bc23 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc24 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 11 + - afl-fuzz -i- -o tests/fuzzing/bc_outputs2 -p explore -S bc24 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc31 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 12 + - afl-fuzz -i- -o tests/fuzzing/bc_outputs3 -p exploit -D -M bc31 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc32 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 13 + - afl-fuzz -i- -o tests/fuzzing/bc_outputs3 -p coe -S bc32 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc33 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 14 + - afl-fuzz -i- -o tests/fuzzing/bc_outputs3 -p fast -S bc33 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: bc34 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 15 + - afl-fuzz -i- -o tests/fuzzing/bc_outputs3 -p explore -S bc34 bin/bc -lq -e "seed = 1280937142.20981723890730892738902938071028973408912703984712093" -f- + - window_name: dc11 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 16 + - afl-fuzz -i- -o tests/fuzzing/dc_outputs -p exploit -D -M dc11 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- + - window_name: dc12 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 17 + - afl-fuzz -i- -o tests/fuzzing/dc_outputs -p coe -S dc12 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- + - window_name: dc13 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 18 + - afl-fuzz -i- -o tests/fuzzing/dc_outputs -p fast -S dc13 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- + - window_name: dc14 + layout: even-horizontal + panes: + - shell_command: + - export AFL_AUTORESUME=1 + - sleep 19 + - afl-fuzz -i- -o tests/fuzzing/dc_outputs -p explore -S dc14 bin/dc -x -e "1280937142.20981723890730892738902938071028973408912703984712093j" -f- diff --git a/tests/fuzzing/bc_inputs1/array.bc b/tests/fuzzing/bc_inputs1/array.bc new file mode 100644 index 000000000000..dac232804914 --- /dev/null +++ b/tests/fuzzing/bc_inputs1/array.bc @@ -0,0 +1,60 @@ +#! /usr/bin/bc -q + +define z(a[]) { + for (i = 0; i < l; ++i) { + a[i] + } +} + +define x(a[]) { + + # Test for separate vars and arrays. + auto a + + for (a = 0; a < l; ++a) { + a[a] = -a + } + + z(a[]) +} + +define g(x[], y[]) { + return x[0] - y[0] +} + +define h(y[], x[]) { + return g(x[], y[]) +} + +define m(*x[], *y[]) { + return x[0] / y[0] +} + +define n(*y[], *x[]) { + return m(x[], y[]) +} + +for (i = 0; i < 101; ++i) { + a[i] = i +} + +a[104] = 204 + +l = length(a[]) + +for (i = 0; i <= l; ++i) { + a[i] +} + +z(a[]) +x(a[]) +z(a[]) +l + +x[0] = 5 +y[0] = 4 + +h(x[], y[]) +n(x[], y[]) + +halt diff --git a/tests/fuzzing/bc_inputs1/decimal.txt b/tests/fuzzing/bc_inputs1/decimal.txt new file mode 100644 index 000000000000..b79da99e3dd2 --- /dev/null +++ b/tests/fuzzing/bc_inputs1/decimal.txt @@ -0,0 +1,30 @@ +0 +0.0 +000000000000000000000000.00000000000000000000000 +000000000000000000000000000135482346782356 +000000000000000000000000002 +1 +1023468723275435238491972521917846 +4343472432431705867392073517038270398027352709027389273920739037937960379637893607893607893670530278200795207952702873892786172916728961783907893607418973587857386079679267926737520730925372983782793652793 +-1 +-18586 +-31378682943772818461924738352952347258 +-823945628745673589495067238723986520375698237620834674509627345273096287563846592384526349872634895763257893467523987578690283762897568459072348758071071087813501875908127359018715023841710239872301387278 +.123521346523546 +0.1245923756273856 +-.1024678456387 +-0.8735863475634587 +4.0 +-6.0 +234237468293576.000000000000000000000000000000 +23987623568943567.00000000000000000005677834650000000000000 +23856934568940675.000000000000000435676782300000000000000456784 +77567648698496.000000000000000000587674750000000000458563800000000000000 +2348672354968723.2374823546000000000003256987394502346892435623870000000034578 +-2354768.000000000000000000000000000000000000 +-96739874567.000000000347683456 +-3764568345.000000000004573845000000347683460 +-356784356.934568495770004586495678300000000 +74325437345273852773827101738273127312738521733017537073520735207307570358738257390761276072160719802671980267018728630178.7082681027680521760217867841276127681270867827821768173178207830710978017738178678012767377058785378278207385237085237803278203782037237582795870 +-756752732785273851273728537852738257837283678965738527385272983678372867327835672967385278372637862738627836279863782673862783670.71738178361738718367186378610738617836781603760178367018603760178107735278372832783728367826738627836278378260736270367362073867097307925 +9812734012837410982345719208345712908357412903587192048571920458712.23957182459817249058172945781 diff --git a/tests/fuzzing/bc_inputs1/functions.bc b/tests/fuzzing/bc_inputs1/functions.bc new file mode 100644 index 000000000000..80d6d1623d8d --- /dev/null +++ b/tests/fuzzing/bc_inputs1/functions.bc @@ -0,0 +1,7 @@ +e(0.5) + +define e(x) { + return x +} + +e(0.5) diff --git a/tests/fuzzing/bc_inputs1/len.bc b/tests/fuzzing/bc_inputs1/len.bc new file mode 100644 index 000000000000..ec931f2386a5 --- /dev/null +++ b/tests/fuzzing/bc_inputs1/len.bc @@ -0,0 +1,48 @@ +define fast_gcd(a, b) { + + if (a == b) return a; + if (a > b) return fast_gcd(a - b, b) + + return fast_gcd(a, b - a); +} + +define void r_reduce(*r[]) { + + auto g,s; + + if (length(r[]) != 2) sqrt(-1); + if (scale(r[0])) 2^r[0]; + if (scale(r[1])) 2^r[1]; + + if (r[0] >= 0 && r[1] >= 0) g = fast_gcd(r[0], r[1]); + else g = gcd(r[0], r[1]); + + s = scale; + scale = 0; + + r[0] /= g; + r[1] /= g; + + scale = s; +} + +define void r_init(*r[], a, b) { + r[0] = a; + r[1] = b; + r_reduce(r[]); +} + +define void r_initi(*r[], i, a, b) { + + length(r[]); + + r[0] = i * b + a; + r[1] = b; + + length(r[]); + + r_reduce(r[]); +} + +length(a[]) +r_initi(a[], 5, 63, 94); diff --git a/tests/fuzzing/bc_inputs1/lib10.txt b/tests/fuzzing/bc_inputs1/lib10.txt new file mode 100644 index 000000000000..7aa3fda19cc7 --- /dev/null +++ b/tests/fuzzing/bc_inputs1/lib10.txt @@ -0,0 +1,4 @@ +l10(0) +l10(99) +l10(100) +l10(-100) diff --git a/tests/fuzzing/bc_inputs1/lib12.txt b/tests/fuzzing/bc_inputs1/lib12.txt new file mode 100644 index 000000000000..7d70e1ccdd5e --- /dev/null +++ b/tests/fuzzing/bc_inputs1/lib12.txt @@ -0,0 +1 @@ +uint(0) diff --git a/tests/fuzzing/bc_inputs1/lib2.txt b/tests/fuzzing/bc_inputs1/lib2.txt new file mode 100644 index 000000000000..f345bd1669cb --- /dev/null +++ b/tests/fuzzing/bc_inputs1/lib2.txt @@ -0,0 +1,15 @@ +r(0, 0) +r(0, 1) +r(0, 100) +r(1, 0) +r(1, 3) +r(1.4, 0) +r(1.5, 0) +r(34.45, 2) +r(64.1223, 4) +r(-1, 0) +r(-1, 3) +r(-1.4, 0) +r(-1.5, 0) +r(-34.45, 2) +r(-64.1223, 4) diff --git a/tests/fuzzing/bc_inputs1/lib3.txt b/tests/fuzzing/bc_inputs1/lib3.txt new file mode 100644 index 000000000000..1da42385ea44 --- /dev/null +++ b/tests/fuzzing/bc_inputs1/lib3.txt @@ -0,0 +1,6 @@ +f(0) +f(1) +f(2) +f(3) +f(4) +f(5) diff --git a/tests/fuzzing/bc_inputs1/lib6.txt b/tests/fuzzing/bc_inputs1/lib6.txt new file mode 100644 index 000000000000..260e159f9fb6 --- /dev/null +++ b/tests/fuzzing/bc_inputs1/lib6.txt @@ -0,0 +1,5 @@ +pi(5) +p=pi(scale) +r2d(-p) +d2r(180) +d2r(-180) diff --git a/tests/fuzzing/bc_inputs2/bitfuncs.txt b/tests/fuzzing/bc_inputs2/bitfuncs.txt new file mode 100644 index 000000000000..e0703a715c08 --- /dev/null +++ b/tests/fuzzing/bc_inputs2/bitfuncs.txt @@ -0,0 +1,42 @@ +band(13946233938940740889, 12028823668264674112) +bor(13946233938940740889, 12028823668264674112) +bxor(13946233938940740889, 12028823668264674112) +bshl(2366588185, 0) +bshr(2366588185, 0) +bshl(347743040, 25) +bshr(347743040, 25) +bnot8(13946233938940740889) +bnot8(25) +bnot16(13946233938940740889) +bnot16(17689) +bnot32(13946233938940740889) +bnot32(2366588185) +bnot64(13946233938940740889) +brev8(13946233938940740889) +brev8(25) +brev16(13946233938940740889) +brev16(17689) +brev32(13946233938940740889) +brev32(2366588185) +brev64(13946233938940740889) +brol8(13946233938940740889, 12028823668264674112) +brol8(25, 64) +brol16(13946233938940740889, 12028823668264674112) +brol16(17689, 9024) +brol32(13946233938940740889, 12028823668264674112) +brol32(2366588185, 347743040) +brol64(13946233938940740889, 12028823668264674112) +bror8(13946233938940740889, 12028823668264674112) +bror8(25, 64) +bror16(13946233938940740889, 12028823668264674112) +bror16(17689, 9024) +bror32(13946233938940740889, 12028823668264674112) +bror32(2366588185, 347743040) +bror64(13946233938940740889, 12028823668264674112) +bmod8(13946233938940740889) +bmod8(25) +bmod16(13946233938940740889) +bmod16(17689) +bmod32(13946233938940740889) +bmod32(2366588185) +bmod64(13946233938940740889) diff --git a/tests/fuzzing/bc_inputs2/lib15.txt b/tests/fuzzing/bc_inputs2/lib15.txt new file mode 100644 index 000000000000..13be33145ba3 --- /dev/null +++ b/tests/fuzzing/bc_inputs2/lib15.txt @@ -0,0 +1 @@ +uint(1) diff --git a/tests/fuzzing/bc_inputs2/lib21.txt b/tests/fuzzing/bc_inputs2/lib21.txt new file mode 100644 index 000000000000..82693695945d --- /dev/null +++ b/tests/fuzzing/bc_inputs2/lib21.txt @@ -0,0 +1 @@ +int(1) diff --git a/tests/fuzzing/bc_inputs2/misc3.txt b/tests/fuzzing/bc_inputs2/misc3.txt new file mode 100644 index 000000000000..7aad374c4ef6 --- /dev/null +++ b/tests/fuzzing/bc_inputs2/misc3.txt @@ -0,0 +1,12 @@ +for (i = 0; i < A; ++i) +{print "n" +if(1)if(1){3 +} +if(0)if(1){3 +} +else 4 +if(0){if(1){3 +}} +else 5 +{i} +} diff --git a/tests/fuzzing/bc_inputs2/modulus.txt b/tests/fuzzing/bc_inputs2/modulus.txt new file mode 100644 index 000000000000..049cd7dbd73c --- /dev/null +++ b/tests/fuzzing/bc_inputs2/modulus.txt @@ -0,0 +1,27 @@ +1 % 1 +2 % 1 +16 % 4 +17 % 4 +3496723859067234 % 298375462837546928347623059375486 +-1 % 1 +-2 % 1 +-1274852934765 % 2387628935486273546 +1 % -1 +2 % -1 +2 % -3 +16 % 5 +89237423 % -237856923854 +-1 % -1 +-2 % -1 +-2 % -2 +-2 % -3 +-13 % -7 +-14 % -7 +-15 % -7 +-127849612 % -23712347682193 +scale = 0 +1 % 1 +2 % 1 +scale = 0; -899510228 % -2448300078.40314 +scale = 0; -7424863 % -207.2609738667 +scale = 0; 3769798918 % 0.6 diff --git a/tests/fuzzing/bc_inputs2/references.bc b/tests/fuzzing/bc_inputs2/references.bc new file mode 100644 index 000000000000..8188f17aa017 --- /dev/null +++ b/tests/fuzzing/bc_inputs2/references.bc @@ -0,0 +1,408 @@ +#! /usr/bin/bc -q + +define printarray(a[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a[i] + } +} + +define a2(a[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a[i] = a[i] * a[i] + } + + printarray(a[], len) +} + +define a4(a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = a__[i] * a__[i] + } + + printarray(a__[], len) +} + +define a6(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = a__[i] * a__[i] + } + + printarray(a__[], len) +} + +define a1(*a[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a[i] = i + } + + a2(a[], len) + + printarray(a[], len) +} + +define a3(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a4(a__[], len) + + printarray(a__[], len) +} + +define a5(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a2(a__[], len) + + printarray(a__[], len) +} + +define a7(*a__[], len) { + + auto i + + for (i = 0; i < len; ++i) { + a__[i] = i + } + + a6(a__[], len) + + printarray(a__[], len) +} + +len = 16 + +a1(a[], len) +printarray(a[], len) +a3(a[], len) +printarray(a[], len) +a5(a[], len) +printarray(a[], len) +a7(a[], len) +printarray(a[], len) + +a1(b[], len) +printarray(b[], len) +a3(b[], len) +printarray(b[], len) +a5(b[], len) +printarray(b[], len) +a7(b[], len) +printarray(b[], len) + +a1[0] = 0 +a2[0] = 0 +a3[0] = 0 +a4[0] = 0 +a5[0] = 0 +a6[0] = 0 +a7[0] = 0 +a8[0] = 0 +a9[0] = 0 +a10[0] = 0 +a11[0] = 0 +a12[0] = 0 +a13[0] = 0 +a14[0] = 0 +a15[0] = 0 +a16[0] = 0 +a17[0] = 0 +a18[0] = 0 +a19[0] = 0 +a20[0] = 0 +a21[0] = 0 +a22[0] = 0 +a23[0] = 0 +a24[0] = 0 +a25[0] = 0 +a26[0] = 0 +a27[0] = 0 +a28[0] = 0 +a29[0] = 0 +a30[0] = 0 +a31[0] = 0 +a32[0] = 0 +a33[0] = 0 +a34[0] = 0 +a35[0] = 0 +a36[0] = 0 +a37[0] = 0 +a38[0] = 0 +a39[0] = 0 +a40[0] = 0 +a41[0] = 0 +a42[0] = 0 +a43[0] = 0 +a44[0] = 0 +a45[0] = 0 +a46[0] = 0 +a47[0] = 0 +a48[0] = 0 +a49[0] = 0 +a50[0] = 0 +a51[0] = 0 +a52[0] = 0 +a53[0] = 0 +a54[0] = 0 +a55[0] = 0 +a56[0] = 0 +a57[0] = 0 +a58[0] = 0 +a59[0] = 0 +a60[0] = 0 +a61[0] = 0 +a62[0] = 0 +a63[0] = 0 +a64[0] = 0 +a65[0] = 0 +a66[0] = 0 +a67[0] = 0 +a68[0] = 0 +a69[0] = 0 +a70[0] = 0 +a71[0] = 0 +a72[0] = 0 +a73[0] = 0 +a74[0] = 0 +a75[0] = 0 +a76[0] = 0 +a77[0] = 0 +a78[0] = 0 +a79[0] = 0 +a80[0] = 0 +a81[0] = 0 +a82[0] = 0 +a83[0] = 0 +a84[0] = 0 +a85[0] = 0 +a86[0] = 0 +a87[0] = 0 +a88[0] = 0 +a89[0] = 0 +a90[0] = 0 +a91[0] = 0 +a92[0] = 0 +a93[0] = 0 +a94[0] = 0 +a95[0] = 0 +a96[0] = 0 +a97[0] = 0 +a98[0] = 0 +a99[0] = 0 +a100[0] = 0 +a101[0] = 0 +a102[0] = 0 +a103[0] = 0 +a104[0] = 0 +a105[0] = 0 +a106[0] = 0 +a107[0] = 0 +a108[0] = 0 +a109[0] = 0 +a110[0] = 0 +a111[0] = 0 +a112[0] = 0 +a113[0] = 0 +a114[0] = 0 +a115[0] = 0 +a116[0] = 0 +a117[0] = 0 +a118[0] = 0 +a119[0] = 0 +a120[0] = 0 +a121[0] = 0 +a122[0] = 0 +a123[0] = 0 +a124[0] = 0 +a125[0] = 0 +a126[0] = 0 +a127[0] = 0 +a128[0] = 0 +a129[0] = 0 +a130[0] = 0 +a131[0] = 0 +a132[0] = 0 +a133[0] = 0 +a134[0] = 0 +a135[0] = 0 +a136[0] = 0 +a137[0] = 0 +a138[0] = 0 +a139[0] = 0 +a140[0] = 0 +a141[0] = 0 +a142[0] = 0 +a143[0] = 0 +a144[0] = 0 +a145[0] = 0 +a146[0] = 0 +a147[0] = 0 +a148[0] = 0 +a149[0] = 0 +a150[0] = 0 +a151[0] = 0 +a152[0] = 0 +a153[0] = 0 +a154[0] = 0 +a155[0] = 0 +a156[0] = 0 +a157[0] = 0 +a158[0] = 0 +a159[0] = 0 +a160[0] = 0 +a161[0] = 0 +a162[0] = 0 +a163[0] = 0 +a164[0] = 0 +a165[0] = 0 +a166[0] = 0 +a167[0] = 0 +a168[0] = 0 +a169[0] = 0 +a170[0] = 0 +a171[0] = 0 +a172[0] = 0 +a173[0] = 0 +a174[0] = 0 +a175[0] = 0 +a176[0] = 0 +a177[0] = 0 +a178[0] = 0 +a179[0] = 0 +a180[0] = 0 +a181[0] = 0 +a182[0] = 0 +a183[0] = 0 +a184[0] = 0 +a185[0] = 0 +a186[0] = 0 +a187[0] = 0 +a188[0] = 0 +a189[0] = 0 +a190[0] = 0 +a191[0] = 0 +a192[0] = 0 +a193[0] = 0 +a194[0] = 0 +a195[0] = 0 +a196[0] = 0 +a197[0] = 0 +a198[0] = 0 +a199[0] = 0 +a200[0] = 0 +a201[0] = 0 +a202[0] = 0 +a203[0] = 0 +a204[0] = 0 +a205[0] = 0 +a206[0] = 0 +a207[0] = 0 +a208[0] = 0 +a209[0] = 0 +a210[0] = 0 +a211[0] = 0 +a212[0] = 0 +a213[0] = 0 +a214[0] = 0 +a215[0] = 0 +a216[0] = 0 +a217[0] = 0 +a218[0] = 0 +a219[0] = 0 +a220[0] = 0 +a221[0] = 0 +a222[0] = 0 +a223[0] = 0 +a224[0] = 0 +a225[0] = 0 +a226[0] = 0 +a227[0] = 0 +a228[0] = 0 +a229[0] = 0 +a230[0] = 0 +a231[0] = 0 +a232[0] = 0 +a233[0] = 0 +a234[0] = 0 +a235[0] = 0 +a236[0] = 0 +a237[0] = 0 +a238[0] = 0 +a239[0] = 0 +a240[0] = 0 +a241[0] = 0 +a242[0] = 0 +a243[0] = 0 +a244[0] = 0 +a245[0] = 0 +a246[0] = 0 +a247[0] = 0 +a248[0] = 0 +a249[0] = 0 +a250[0] = 0 +a251[0] = 0 +a252[0] = 0 +a253[0] = 0 +a254[0] = 0 +a255[0] = 0 +a256[0] = 0 + +a1(a253[], len) +printarray(a253[], len) +a3(a253[], len) +printarray(a253[], len) +a5(a253[], len) +printarray(a253[], len) +a7(a253[], len) +printarray(a253[], len) + +a1(a254[], len) +printarray(a254[], len) +a3(a254[], len) +printarray(a254[], len) +a5(a254[], len) +printarray(a254[], len) +a7(a254[], len) +printarray(a254[], len) + +a1(a255[], len) +printarray(a255[], len) +a3(a255[], len) +printarray(a255[], len) +a5(a255[], len) +printarray(a255[], len) +a7(a255[], len) +printarray(a255[], len) + +a1(a256[], len) +printarray(a256[], len) +a3(a256[], len) +printarray(a256[], len) +a5(a256[], len) +printarray(a256[], len) +a7(a256[], len) +printarray(a256[], len) diff --git a/tests/fuzzing/bc_inputs3/02.txt b/tests/fuzzing/bc_inputs3/02.txt new file mode 100644 index 000000000000..8cf0f3e6fec1 --- /dev/null +++ b/tests/fuzzing/bc_inputs3/02.txt @@ -0,0 +1 @@ +obase^= 20-f-b-4^-f-4-4^-f-4^-d diff --git a/tests/fuzzing/bc_inputs3/03.txt b/tests/fuzzing/bc_inputs3/03.txt new file mode 100644 index 000000000000..00e645cea896 --- /dev/null +++ b/tests/fuzzing/bc_inputs3/03.txt @@ -0,0 +1,2 @@ +for (i = 0; ; ) +for (i = 0; ;(p(s(ssqrtt()-p())))000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000#000 diff --git a/tests/fuzzing/bc_inputs3/06.txt b/tests/fuzzing/bc_inputs3/06.txt new file mode 100644 index 000000000000..29fe6be37021 --- /dev/null +++ b/tests/fuzzing/bc_inputs3/06.txt @@ -0,0 +1 @@ +while (i == 0) { diff --git a/tests/fuzzing/bc_inputs3/07.txt b/tests/fuzzing/bc_inputs3/07.txt new file mode 100644 index 000000000000..e899d8547868 --- /dev/null +++ b/tests/fuzzing/bc_inputs3/07.txt @@ -0,0 +1,8 @@ +for(q=F;i<=020; ++i) #00 +{print "0" +if(6)if(6){3 +} +{pr0n} +""} +{pr0n} +{print "" "" diff --git a/tests/fuzzing/bc_inputs3/10.txt b/tests/fuzzing/bc_inputs3/10.txt new file mode 100644 index 000000000000..23fb8689f598 --- /dev/null +++ b/tests/fuzzing/bc_inputs3/10.txt @@ -0,0 +1 @@ +d000$++ diff --git a/tests/fuzzing/bc_inputs3/12.txt b/tests/fuzzing/bc_inputs3/12.txt new file mode 100644 index 000000000000..143bb71deeda --- /dev/null +++ b/tests/fuzzing/bc_inputs3/12.txt @@ -0,0 +1,2 @@ +for (v ;!j -90-90; ++i) +a= ibase ++;0 diff --git a/tests/fuzzing/bc_inputs3/16.txt b/tests/fuzzing/bc_inputs3/16.txt new file mode 100644 index 000000000000..977569bda330 --- /dev/null +++ b/tests/fuzzing/bc_inputs3/16.txt @@ -0,0 +1 @@ +"0
\ No newline at end of file diff --git a/tests/fuzzing/bc_inputs3/trunc.txt b/tests/fuzzing/bc_inputs3/trunc.txt new file mode 100644 index 000000000000..364bb224a2e3 --- /dev/null +++ b/tests/fuzzing/bc_inputs3/trunc.txt @@ -0,0 +1,15 @@ +0$ +1$ +2$ +0.8249167203486$ +1.28937150237$ +2.0$ +28937.92837605126$ +2890.000000000$ +-1$ +-1.128973$ +-9812387.28910273$ +x = 83.298 +x$ +x = -1893.19 +(x)$ diff --git a/tests/fuzzing/dc_inputs/01.txt b/tests/fuzzing/dc_inputs/01.txt new file mode 100644 index 000000000000..9622de95a241 --- /dev/null +++ b/tests/fuzzing/dc_inputs/01.txt @@ -0,0 +1,2 @@ +[[000000000 +00000] diff --git a/tests/fuzzing/dc_inputs/02.txt b/tests/fuzzing/dc_inputs/02.txt new file mode 100644 index 000000000000..79565935cf23 --- /dev/null +++ b/tests/fuzzing/dc_inputs/02.txt @@ -0,0 +1,5 @@ +0 R +2 1 +1 0+pRpp +30.x +[00000000]ip1+pR diff --git a/tests/fuzzing/dc_inputs/03.txt b/tests/fuzzing/dc_inputs/03.txt new file mode 100644 index 000000000000..ecede2e05629 --- /dev/null +++ b/tests/fuzzing/dc_inputs/03.txt @@ -0,0 +1,2 @@ +0 lip1-si0l0+200sx_9lq+pR 30.x +[li100L0dp1+s+sX10lM<0]sL0sJlLx diff --git a/tests/fuzzing/dc_inputs/04.txt b/tests/fuzzing/dc_inputs/04.txt new file mode 100644 index 000000000000..209f50c16d52 --- /dev/null +++ b/tests/fuzzing/dc_inputs/04.txt @@ -0,0 +1,9 @@ +zp100000000.000004p1+pR +0 1 1+kpR +1 1+pR +1 0IpR +2 9+iR +037 483+pR +999 999+pR +237467456283846vpR +.0000000ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddsdddddddddddddddddddddddddddddddddddddddddddddddddddddsdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd/ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddfddddddddddddddddddddddddddddddddddddddddddddddddddddddcdddddddddddd9000000000000000000 diff --git a/tests/fuzzing/dc_inputs/05.txt b/tests/fuzzing/dc_inputs/05.txt new file mode 100644 index 000000000000..bf2ca982ed2b --- /dev/null +++ b/tests/fuzzing/dc_inputs/05.txt @@ -0,0 +1,3 @@ +04000000000000300sx_9000.00000syzpRlxlq+pR +30.x +[li1000000sxL0LLLL900000.00000sLLL]sL0s0lLx diff --git a/tests/fuzzing/dc_inputs/06.txt b/tests/fuzzing/dc_inputs/06.txt new file mode 100644 index 000000000000..eff417eb55b4 --- /dev/null +++ b/tests/fuzzing/dc_inputs/06.txt @@ -0,0 +1 @@ +00Q;pd60 p d9S06+00I;pd60Q2 0^pR diff --git a/tests/fuzzing/dc_inputs/07.txt b/tests/fuzzing/dc_inputs/07.txt new file mode 100644 index 000000000000..8a09152faf58 --- /dev/null +++ b/tests/fuzzing/dc_inputs/07.txt @@ -0,0 +1,3 @@ +1 0 1|dR +1 [li0L]SL10sildR +1 [li0L]sL10|Lx diff --git a/tests/fuzzing/dc_inputs/08.txt b/tests/fuzzing/dc_inputs/08.txt new file mode 100644 index 000000000000..156de2f536b6 --- /dev/null +++ b/tests/fuzzing/dc_inputs/08.txt @@ -0,0 +1 @@ +0 2+p[lip1-si0li!=0^di>0]S098sil0x diff --git a/tests/fuzzing/dc_inputs/09.txt b/tests/fuzzing/dc_inputs/09.txt new file mode 100644 index 000000000000..ffc3a08908d4 --- /dev/null +++ b/tests/fuzzing/dc_inputs/09.txt @@ -0,0 +1,9 @@ +#00000 +0sm[Nx]0s0[]0s0x[]zs0x[]0s0[]zs0c +0s0[Nx]0s0[]zs0x[]zs0x[Nx]0s0[]zs0#000000000 +0s0[Nx]0s_[]zs0x[li]zs^x[l0000000]0sm[]zs0x[liNx]zs0x[li;0lilix] +x[liN]zsWx[liN]zs0x[li;0lilix] +x[liNzs0x#000000000 +*sm[Nx]0sm[]zs0x[li]zs0x[Nx]0sm[]zsdc +0sm[Nx]0sm[]zs0x[li]zs0x[Nx]0sm[]x]zsxx#000000000 +*s0[Nx]0sm[]0s00[00]zs0x[Nx]0sm[]z0dc diff --git a/tests/fuzzing/dc_inputs/10.txt b/tests/fuzzing/dc_inputs/10.txt new file mode 100644 index 000000000000..0fade4bb899f --- /dev/null +++ b/tests/fuzzing/dc_inputs/10.txt @@ -0,0 +1,11 @@ +#0000 +0sm[Nx]0sm[]0s0x[li]0s0x[Nfvfff[]0sm[]zs0x[li]zs0x[Nx]0sm[]zs0c +0sm[Nx]0sm[]x[li]zs0x[Nx]0sm[]zs0c +0sm[Nx]0sm[]zs0x[li]zs0x[Nx]0sm[]zs0c +0sm[Nx]0sm[]zs0x[li]zs0x[Nx]0sm[]zs0#000000000 +0sm[Nx]0s0[]zs0x[li]zs0x[0000000000]0sm[]zs0x[liNx]zs0x[li;0l0l0x] +x[liNx]zs0x#000000000 +0sm[Nx]0sm[]zs0x[li]zs0x[000]0sm[]x[li]zs0x[Nx]0sm[]zs0c +0sm[Nx]0sm[]zs0x[li]zs0x[Nx]0sm[]zs0#0000 +0sm[Nx]0sm[]zs0x[li]zs0x[Nx]0sm[]zs0#000000000 +0sm[Nx]0s_@]zs0x[li]s^x[0000000000]0s0[]zsW[0000]zsxx[000000000] diff --git a/tests/fuzzing/dc_inputs/11.txt b/tests/fuzzing/dc_inputs/11.txt new file mode 100644 index 000000000000..73bbc7d88f1c --- /dev/null +++ b/tests/fuzzing/dc_inputs/11.txt @@ -0,0 +1,4 @@ +#00000000 +[[00000]aa]sM[lip1-si0li>0eM]s010sil0x +[[0000]00]sM[]s010sil0x +[R]sM[lip=000]s0;0 diff --git a/tests/fuzzing/dc_inputs/12.txt b/tests/fuzzing/dc_inputs/12.txt new file mode 100644 index 000000000000..aff25e7381cd --- /dev/null +++ b/tests/fuzzing/dc_inputs/12.txt @@ -0,0 +1,2 @@ +1;09R0si[lii000000000000000000000000000000000000000000]li1000 2346dvdddd;ddddddddddddd?-sdddddddddd0+dd0 1+pR +0dvdddd;ddSddddddddddd 0si[lid1+sil0sili10li?-s0]dsxx[00000000]li1000 2000dvddddddddddddddddddddddddd0 0+ddd 1+pR diff --git a/tests/fuzzing/dc_inputs/13.txt b/tests/fuzzing/dc_inputs/13.txt new file mode 100644 index 000000000000..e6af9463e38c --- /dev/null +++ b/tests/fuzzing/dc_inputs/13.txt @@ -0,0 +1,7 @@ +zp10[00000000\00]pppppppppppppppR +_1 _1(pR +_1 _2(pR +2 1{pR +_1 1{pR 990+pR +2000000 300000300000000+pR +2070000000aaaaaaaaaaaaaaxaaaaaaaaaaaaR diff --git a/tests/fuzzing/dc_inputs/14.txt b/tests/fuzzing/dc_inputs/14.txt new file mode 100644 index 000000000000..741f3bfd7704 --- /dev/null +++ b/tests/fuzzing/dc_inputs/14.txt @@ -0,0 +1,7 @@ +0bpR +1bpR +.200000bpR +100000.0000600bpR +_10bpR +_.1000000bpR +_30000.00bpR:
\ No newline at end of file diff --git a/tests/fuzzing/dc_inputs/15.txt b/tests/fuzzing/dc_inputs/15.txt new file mode 100644 index 000000000000..828e8204a2aa --- /dev/null +++ b/tests/fuzzing/dc_inputs/15.txt @@ -0,0 +1,11 @@ +0bpax1bpR +1bpR +.30b900pR +_10bp/90 +_30_.1/10bp30_.1/90 +_300.1/90/90 +_30_.1/90 +_30000.1/90 +90 +_30000.1/90 +70.000 70u diff --git a/tests/fuzzing/dc_inputs/16.txt b/tests/fuzzing/dc_inputs/16.txt new file mode 100644 index 000000000000..b021dd66d7ff --- /dev/null +++ b/tests/fuzzing/dc_inputs/16.txt @@ -0,0 +1 @@ +0 0;^dddddRps0R@s016dddRRd^2ddRZ(b-P;;$p;;;;;;9;;;;;;$ppppppppppppp30 diff --git a/tests/fuzzing/dc_inputs/17.txt b/tests/fuzzing/dc_inputs/17.txt new file mode 100644 index 000000000000..fb46510fc3e3 --- /dev/null +++ b/tests/fuzzing/dc_inputs/17.txt @@ -0,0 +1,20 @@ +0 1(pR +1;;;;;pR +1 +0 18d[0000000 +000000000000000000000000000000]sM[liv1-si0li!<0pR +_1 0{pR +_1 _1{pR +_1 f0070000000000.0000000000000_10000000000006.00000000000005~pRpR +_23745860900000.070000000000000 _0.20542357869124050~pRpR +_3000000000000000.0000000700000006002 _7000000000000005000000000.000F000000000000003~pRpR20000000 300000000003.00000000000000030~pRpR +_30000000000000000000000000 +1 0.001.00000000030 +1 0.000000000000000000000000000000000000000000000000000000000000000000002x30000000000000000000000000000000000000$80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000<0800000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000.000F000000000000003~pRpR20000000 300000000003.00000000000000030~pRpR +_30000000000000.00000000000 +1 0.070.70000000000 +1 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000$80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000<080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000S8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z800000000000 +_10pR +=390NpR +_2000 +40000 5000C 2i>0eM]s01@sil0x diff --git a/tests/fuzzing/dc_inputs/18.txt b/tests/fuzzing/dc_inputs/18.txt new file mode 100644 index 000000000000..ed2659d097c2 --- /dev/null +++ b/tests/fuzzing/dc_inputs/18.txt @@ -0,0 +1,3 @@ +1oVVf[li;WORli1S0Zli1;rORli1dH|2li@d-NliO+rK28729@9547628O745/pR +_29307546189299999999999999999999999999999999999995 0.00000000000000000000000000009999999999999999999+99$9999999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999995 0.0000000000000000000000000000000000R0000000000000000000000000000000000000+0000000000000000-0000000000000000000005+pR +99999999999999999999999999999999999999999999999999999999999.999999999999999999999.99999999999999999999999999999999999999999900000000000000000000000R0000000000000000000000000000000000000+0000000000000000-0000000000000000000005+pR999999999999999999999999999999999999999999 0.00000000000000000000000000000000000000000000000000000000000C0020P00000000000000000000000000000000000007fli1+7fli1+si;d7dli1+si;0=Rls1d:0li +i100>x]dsxx[0000000]dsxx[p000]l010000000 00000000000pR diff --git a/tests/fuzzing/dc_inputs/20.txt b/tests/fuzzing/dc_inputs/20.txt new file mode 100644 index 000000000000..aa7752a85c67 --- /dev/null +++ b/tests/fuzzing/dc_inputs/20.txt @@ -0,0 +1,3 @@ +#0000 +I20PPrP PPPP PPs0daP1:0pR + PPP1d:0pRR diff --git a/tests/fuzzing/dc_inputs/21.txt b/tests/fuzzing/dc_inputs/21.txt new file mode 100644 index 000000000000..01707d8256b6 --- /dev/null +++ b/tests/fuzzing/dc_inputs/21.txt @@ -0,0 +1,5 @@ +0bpR +1bpR +.200000bpR +100000.0000600bpR +S09bpR diff --git a/tests/fuzzing/dc_inputs/22.txt b/tests/fuzzing/dc_inputs/22.txt new file mode 100644 index 000000000000..898184649926 --- /dev/null +++ b/tests/fuzzing/dc_inputs/22.txt @@ -0,0 +1,36 @@ +[0000000000000]ZpR +[He00 +[0000000\00000000]00 +[0000000\00000000]000 +[0000000\00000000]00 +[0000] +00000] +[28pR] +[27pR] +[26pR] +[25pR] +[24pR] +[23pR] +[22pR] +[21pR] +[20pR] +[19pR] +[18pR] +[17pR] +[16pR] +[15pR] +[14pR] +[13pR] +[12pR] +[11pR] +[10pR] +[9pR] +[8pR] +[7pR] +[6pR] +[5pR] +[4pR] +[3pR] +[2pR] +[1pR] +[xz0<x]dsxx diff --git a/tests/fuzzing/dc_inputs/23.txt b/tests/fuzzing/dc_inputs/23.txt new file mode 100644 index 000000000000..1897dfbbb0aa --- /dev/null +++ b/tests/fuzzing/dc_inputs/23.txt @@ -0,0 +1,2 @@ +#00000000 +[[0000]00]SM[l0p1-s00l0`000]s010sil0x diff --git a/tests/fuzzing/dc_inputs/24.txt b/tests/fuzzing/dc_inputs/24.txt new file mode 100644 index 000000000000..fb9b04f7f5b8 --- /dev/null +++ b/tests/fuzzing/dc_inputs/24.txt @@ -0,0 +1 @@ + [] 0:xX:0 0:0X:0n/dc.000C00}pR diff --git a/tests/fuzzing/dc_inputs/25.txt b/tests/fuzzing/dc_inputs/25.txt new file mode 100644 index 000000000000..d48a9b2e83fd --- /dev/null +++ b/tests/fuzzing/dc_inputs/25.txt @@ -0,0 +1,6 @@ +#00000000 +0s0[l0d:0l01;0d:0l01;0pRl01+s0l010>x]dsxx0sx0s0 +1 2 +s0[l0d:0l01;0d:0l01;0pRl01+s0l010>x]dsxx0sx0s0 +1 2 +€ diff --git a/tests/fuzzing/dc_inputs/26.txt b/tests/fuzzing/dc_inputs/26.txt new file mode 100644 index 000000000000..731d3969ac3b --- /dev/null +++ b/tests/fuzzing/dc_inputs/26.txt @@ -0,0 +1,155 @@ +0bpR +1bp0 +.20bpR +100000.0000005bpR +_10bpR +_.1000[l0;0;rpRl01+s0l010>x]dsxx0sx0s0 +1 2+p+p +3+p +4+p +5+p +6+p +7+p +8+p +9+p +10+p +11+p +12+p +13+p +14+p +15+p +16+p +17+p +18+p +19+p +20+p +21+0+p +71+o +70+p +70+p +70+p +70+p +22+p +20+p +20+p +20+p +20+p +20+p +20+p +20+p +30+p +30+p +30+p +30+p +30+p +30+p +30+p +30+p +30+p +30+p +40+1+p +40+p +40+p +40+p +40+p +40+p +40+p +40+p +40+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +60+p +60+p +60bpR +1bp0 +.20bpR +100000.0070000bpR +_10bpR +_.1000[l0;0;rpRl01+s0l010>x]dsxx0sx0s0 +1 2+p+p +3+p +4+p +5+p +6+p +7+p +8+p +9+p +10+p +11+p +12+p +13+p +14+p +15+p +16+p +17+p +18+p +19+p +20+p +21+0+p +71+o +70+p +70+p +70+p +70+p +22+p +20+p +20+p +20+p +20+p +20+p +20+p +20+p +30+p +30+p +30+p +30+p +30+p +30+p +30+p +30+p +30+p +30+p +40+1+p +40+p +40+p +40+p +40+p +40+p +40+p +40+p +40+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +50+p +60+p +60+p +60+p +60+p +60+p +60+p +60+p +60 +70+p +70+p +70+p +70+p +70+p +70+p +70+p +80+p +È diff --git a/tests/fuzzing/dc_inputs/27.txt b/tests/fuzzing/dc_inputs/27.txt new file mode 100644 index 000000000000..69745b952afc --- /dev/null +++ b/tests/fuzzing/dc_inputs/27.txt @@ -0,0 +1,2 @@ +"0000000\ + diff --git a/tests/fuzzing/dc_inputs/28.txt b/tests/fuzzing/dc_inputs/28.txt new file mode 100644 index 000000000000..fe81732b3e38 --- /dev/null +++ b/tests/fuzzing/dc_inputs/28.txt @@ -0,0 +1 @@ +10 4%0:i[000] 1:b 0;0 p 1;b0:b [000] 1:b 0;b p 1;b~b 0;b p 0;b~~~0k diff --git a/tests/fuzzing/dc_inputs/29.txt b/tests/fuzzing/dc_inputs/29.txt new file mode 100644 index 000000000000..886eb8ee0a8e --- /dev/null +++ b/tests/fuzzing/dc_inputs/29.txt @@ -0,0 +1,13 @@ +10 4%0:b [200] 1:b 0;b 1;b X + 2000 1%p0 +3460:b [200] 1:b 0;b p bp0 +.2 1%pR +6 4%pR +10 4%0:b [200] 1:b 0;b p 1;b X + 20000 1%pR +b 0;b p 0;b2 +1bpb [200] 1:u 0;b p 1;b X + 2 +[000] 0:b [200] 0:b 0;b p S0b p +[s0]XpR + diff --git a/tests/fuzzing/dc_inputs/30.txt b/tests/fuzzing/dc_inputs/30.txt new file mode 100644 index 000000000000..e072e71617d8 --- /dev/null +++ b/tests/fuzzing/dc_inputs/30.txt @@ -0,0 +1 @@ +0;0[]0:b;bs0l0x;0 diff --git a/tests/fuzzing/dc_inputs/abs.txt b/tests/fuzzing/dc_inputs/abs.txt new file mode 100644 index 000000000000..9907dfc6679d --- /dev/null +++ b/tests/fuzzing/dc_inputs/abs.txt @@ -0,0 +1,7 @@ +0bpR +1bpR +.218933bpR +138963.9873645bpR +_19bpR +_.1298376bpR +_3892173.289375bpR diff --git a/tests/fuzzing/dc_inputs/add.txt b/tests/fuzzing/dc_inputs/add.txt new file mode 100644 index 000000000000..42da2f1f309c --- /dev/null +++ b/tests/fuzzing/dc_inputs/add.txt @@ -0,0 +1,33 @@ +0 0+pR +0 0 0++pR +0 1+pR +0 1 1++pR +1 1+pR +1 0+pR +2 5+pR +237 483+pR +999 999+pR +2374623 324869356734856+pR +2378639084586723980562 23468729367839+pR +37298367203972395108367910823465293084561329084561390845613409516734503870691837451 785621394067928346918023476190834672198467134908618723249671349062187346898241093486139046139084613490817356023871869102746182749061872609129847+pR +1.1 0+pR +0 1.1+pR +457283.731284923576 37842934672834.3874629385672354+pR +1.0 0.1+pR +3746289134067138046 0.138375863945672398456712389456273486293+pR +_1 _1+pR +_4 _15+pR +_1346782 _1287904651762468913476+pR +99999999999999999999999999999999999999999999999999999999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+pR +99999999999999999999999999999999999999999999999999999999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999995 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005+pR +99999999999999999999999999999999999999999999999999999999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+pR +99999999999999999999999999999999999999999999999999999999999.999999999999999999999999999999999999999999999999999999999899999999999999999999999999999999999999999999999999999999999999 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+pR +99999999999999999999999999999999999989999999999999999999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+pR +_1889985797 2012747315+pR +0 _14338.391079082+pR +_2422297 1.3134942556+pR +_1289374 1289374.2893417 0.238971 28937.28971+++pR +1289374 1289374.2893417 _0.238971 28937.28971+++pR +1289374 1289374.2893417 0.238971 _28937.28971+++pR +1289374 1289374.2893417 _0.238971 _28937.28971+++pR +1289374 _1289374.2893417 _0.238971 _28937.28971+++pR diff --git a/tests/fuzzing/dc_inputs/array.dc b/tests/fuzzing/dc_inputs/array.dc new file mode 100644 index 000000000000..970f29a68768 --- /dev/null +++ b/tests/fuzzing/dc_inputs/array.dc @@ -0,0 +1,2 @@ +#! /usr/bin/dc +0si[lid:rli1+sili100>x]dsxx[li;rpRli1-sili100!>x]li1+[li;rpRli1+sili100>x] diff --git a/tests/fuzzing/dc_inputs/boolean.txt b/tests/fuzzing/dc_inputs/boolean.txt new file mode 100644 index 000000000000..815100f0d085 --- /dev/null +++ b/tests/fuzzing/dc_inputs/boolean.txt @@ -0,0 +1,80 @@ +0 1(pR +1 1(pR +2 1(pR +_1 1(pR +_1 0(pR +_1 _1(pR +_1 _2(pR +0 1{pR +1 1{pR +2 1{pR +_1 1{pR +_1 0{pR +_1 _1{pR +_1 _2{pR +0 1)pR +1 1)pR +2 1)pR +_1 1)pR +_1 0)pR +_1 _1)pR +_1 _2)pR +0 1}pR +1 1}pR +2 1}pR +_1 1}pR +_1 0}pR +_1 _1}pR +_1 _2}pR +0 0GpR +0 1GpR +1 0GpR +_1 _1GpR +0 _1GpR +_1 0GpR +1 1GpR +238 2GpR +0NpR +1NpR +_1NpR +2398NpR +_2983.2389NpR +0 0MpR +1 0MpR +0 1MpR +1 1MpR +128973240 0MpR +0 2893712MpR +1982 28937MpR +_2938 0MpR +0 _1023.298037MpR +0.283917 0MpR +2389 _1208.28937MpR +0 289.289372MpR +_298.29387 0MpR +_2983.28973 82937MpR +0 _2938.320837MpR +_2089.2308 0MpR +_0.2893 _2938.28973MpR +0.00000 1892MpR +1289.023 .0000MpR +0 0mpR +1 0mpR +0 1mpR +1 1mpR +128973240 0mpR +0 2893712mpR +1982 28937mpR +_2938 0mpR +0 _1023.298037mpR +0.283917 0mpR +2389 _1208.28937mpR +0 289.289372mpR +_298.29387 0mpR +_2983.28973 82937mpR +0 _2938.320837mpR +_2089.2308 0mpR +_0.2893 _2938.28973mpR +0.00000 1892mpR +1289.023 .0000mpR +0.0000 .00000mpR diff --git a/tests/fuzzing/dc_inputs/decimal.txt b/tests/fuzzing/dc_inputs/decimal.txt new file mode 100644 index 000000000000..fdc628c857e0 --- /dev/null +++ b/tests/fuzzing/dc_inputs/decimal.txt @@ -0,0 +1,41 @@ +0pR +0.0pR +.0000pR +000000000000000000000000.00000000000000000000000pR +000000000000000000000000000135482346782356pR +000000000000000000000000002pR +1pR +11pR +123pR +7505pR +1023468723275435238491972521917846pR +4343472432431705867392073517038270398027352709027389273920739037937960379637893607893607893670530278200795207952702873892786172916728961783907893607418973587857386079679267926737520730925372983782793652793pR +_1pR +_203pR +_57pR +_18586pR +_31378682943772818461924738352952347258pR +_823945628745673589495067238723986520375698237620834674509627345273096287563846592384526349872634895763257893467523987578690283762897568459072348758071071087813501875908127359018715023841710239872301387278pR +.123521346523546pR +0.1245923756273856pR +_.1024678456387pR +_0.8735863475634587pR +4.0pR +_6.0pR +234237468293576.000000000000000000000000000000pR +23987623568943567.00000000000000000005677834650000000000000pR +23856934568940675.000000000000000435676782300000000000000456784pR +77567648698496.000000000000000000587674750000000000458563800000000000000pR +2348672354968723.2374823546000000000003256987394502346892435623870000000034578pR +_2354768.000000000000000000000000000000000000pR +_96739874567.000000000347683456pR +_3764568345.000000000004573845000000347683460pR +_356784356.934568495770004586495678300000000pR +74325437345273852773827101738273127312738521733017537073520735207307570358738257390761276072160719802671980267018728630178.7082681027680521760217867841276127681270867827821768173178207830710978017738178678012767377058785378278207385237085237803278203782037237582795870pR +_756752732785273851273728537852738257837283678965738527385272983678372867327835672967385278372637862738627836279863782673862783670.71738178361738718367186378610738617836781603760178367018603760178107735278372832783728367826738627836278378260736270367362073867097307925pR +9812734012837410982345719208345712908357412903587192048571920458712.23957182459817249058172945781pR +2893.982.28937pRpR +198273\ +.192837pR +1892.238907\ +.3982739pRpR diff --git a/tests/fuzzing/dc_inputs/divide.txt b/tests/fuzzing/dc_inputs/divide.txt new file mode 100644 index 000000000000..38b874e9f175 --- /dev/null +++ b/tests/fuzzing/dc_inputs/divide.txt @@ -0,0 +1,33 @@ +20k +0 1/pR +0 321566/pR +0 0.3984567238456/pR +1 1/pR +1 1287469297356/pR +1 0.2395672438567234/pR +1 237586239856.0293596728392360/pR +1249687284356 3027949207835207/pR +378617298617396719 35748521/pR +9348576237845624358 0.9857829375461/pR +35768293846193284 2374568947.045762839567823/pR +_78987234567812345 876542837618936/pR +_356789237555535468 0.3375273860984786903/pR +_5203475364850390 435742903748307.70869378534043296404530458/pR +_0.37861723347576903 7385770896/pR +_0.399454682043962 0.34824389304/pR +_0.6920414523873204 356489645223.76076045304879030/pR +_35872917389671.7573280963748 73924708/pR +_78375896314.4836709876983 0.78356798637817/pR +_2374123896417.143789621437581 347821469423789.1473856783960/pR +_896729350238549726 _34976289345762/pR +_2374568293458762348596 _0.8792370647234987679/pR +_237584692306721845726038 _21783910782374529637.978102738746189024761/pR +_0.23457980123576298375682 _1375486293874612/pR +_0.173897061862478951264 _0.8179327486017634987516298745/pR +_0.9186739823576829347586 _0.235678293458756239846/pR +_0.9375896183746982374568 _13784962873546.0928729395476283745/pR +_2930754618923467.12323745862937465 _734869238465/pR +_23745861923467.874675129834675 _0.23542357869124756/pR +_3878923750692883.7238596702834756902 _7384192674957215364986723.9738461923487621983/pR +1 0.00000000000000000000000000000000000000000002346728372937352457354204563027/pR +239854711289345712 2891374 182 .2893 ///pR diff --git a/tests/fuzzing/dc_inputs/divmod.txt b/tests/fuzzing/dc_inputs/divmod.txt new file mode 100644 index 000000000000..1633203ff99f --- /dev/null +++ b/tests/fuzzing/dc_inputs/divmod.txt @@ -0,0 +1,64 @@ +20k +0 1~pRpR +0 321566~pRpR +0 0.3984567238456~pRpR +1 1~pRpR +1 1287469297356~pRpR +1 0.2395672438567234~pRpR +1 237586239856.0293596728392360~pRpR +1249687284356 3027949207835207~pRpR +378617298617396719 35748521~pRpR +9348576237845624358 0.9857829375461~pRpR +35768293846193284 2374568947.045762839567823~pRpR +_78987234567812345 876542837618936~pRpR +_356789237555535468 0.3375273860984786903~pRpR +_5203475364850390 435742903748307.70869378534043296404530458~pRpR +_0.37861723347576903 7385770896~pRpR +_0.399454682043962 0.34824389304~pRpR +_0.6920414523873204 356489645223.76076045304879030~pRpR +_35872917389671.7573280963748 73924708~pRpR +_78375896314.4836709876983 0.78356798637817~pRpR +_2374123896417.143789621437581 347821469423789.1473856783960~pRpR +_896729350238549726 _34976289345762~pRpR +_2374568293458762348596 _0.8792370647234987679~pRpR +_237584692306721845726038 _21783910782374529637.978102738746189024761~pRpR +_0.23457980123576298375682 _1375486293874612~pRpR +_0.173897061862478951264 _0.8179327486017634987516298745~pRpR +_0.9186739823576829347586 _0.235678293458756239846~pRpR +_0.9375896183746982374568 _13784962873546.0928729395476283745~pRpR +_2930754618923467.12323745862937465 _734869238465~pRpR +_23745861923467.874675129834675 _0.23542357869124756~pRpR +_3878923750692883.7238596702834756902 _7384192674957215364986723.9738461923487621983~pRpR +1 0.00000000000000000000000000000000000000000002346728372937352457354204563027~pRpR +0k +0 1~pRpR +0 321566~pRpR +0 0.3984567238456~pRpR +1 1~pRpR +1 1287469297356~pRpR +1 0.2395672438567234~pRpR +1 237586239856.0293596728392360~pRpR +1249687284356 3027949207835207~pRpR +378617298617396719 35748521~pRpR +9348576237845624358 0.9857829375461~pRpR +35768293846193284 2374568947.045762839567823~pRpR +_78987234567812345 876542837618936~pRpR +_356789237555535468 0.3375273860984786903~pRpR +_5203475364850390 435742903748307.70869378534043296404530458~pRpR +_0.37861723347576903 7385770896~pRpR +_0.399454682043962 0.34824389304~pRpR +_0.6920414523873204 356489645223.76076045304879030~pRpR +_35872917389671.7573280963748 73924708~pRpR +_78375896314.4836709876983 0.78356798637817~pRpR +_2374123896417.143789621437581 347821469423789.1473856783960~pRpR +_896729350238549726 _34976289345762~pRpR +_2374568293458762348596 _0.8792370647234987679~pRpR +_237584692306721845726038 _21783910782374529637.978102738746189024761~pRpR +_0.23457980123576298375682 _1375486293874612~pRpR +_0.173897061862478951264 _0.8179327486017634987516298745~pRpR +_0.9186739823576829347586 _0.235678293458756239846~pRpR +_0.9375896183746982374568 _13784962873546.0928729395476283745~pRpR +_2930754618923467.12323745862937465 _734869238465~pRpR +_23745861923467.874675129834675 _0.23542357869124756~pRpR +_3878923750692883.7238596702834756902 _7384192674957215364986723.9738461923487621983~pRpR +1 0.00000000000000000000000000000000000000000002346728372937352457354204563027~pRpR diff --git a/tests/fuzzing/dc_inputs/else.dc b/tests/fuzzing/dc_inputs/else.dc new file mode 100644 index 000000000000..84deb8754e9f --- /dev/null +++ b/tests/fuzzing/dc_inputs/else.dc @@ -0,0 +1,4 @@ +#! /usr/bin/dc +[[Done!]pR]sM[lip1-si0li>LeM]sL10silLx +[[Done!]pR]sM[lip1-si0li!<LeM]sL10silLx +[[Done!]pR]sM[lip1-si0li!=LeM]sL10silLx diff --git a/tests/fuzzing/dc_inputs/engineering.txt b/tests/fuzzing/dc_inputs/engineering.txt new file mode 100644 index 000000000000..90a35052b3cb --- /dev/null +++ b/tests/fuzzing/dc_inputs/engineering.txt @@ -0,0 +1,19 @@ +1o +0pR +1pR +_34pR +298pR +_8933pR +29488pR +_148232pR +8927559pR +.2pR +_.02pR +.002pR +_.0003pR +.0000209310pR +_.00000289362pR +.000000859289pR +_.02983672pR +.20201296pR +_.8907210897000000000000000000pR diff --git a/tests/fuzzing/dc_inputs/loop.dc b/tests/fuzzing/dc_inputs/loop.dc new file mode 100644 index 000000000000..26cec23818df --- /dev/null +++ b/tests/fuzzing/dc_inputs/loop.dc @@ -0,0 +1,3 @@ +#! /usr/bin/dc +[lip1-si0li>L]sL10silLx +[lip1+si10li<L]sL0silLx diff --git a/tests/fuzzing/dc_inputs/misc.txt b/tests/fuzzing/dc_inputs/misc.txt new file mode 100644 index 000000000000..222a3ad265d2 --- /dev/null +++ b/tests/fuzzing/dc_inputs/misc.txt @@ -0,0 +1 @@ +zp198202389.289374pzp[Hello, World!]pzpzpfrfczpfR diff --git a/tests/fuzzing/dc_inputs/modexp.txt b/tests/fuzzing/dc_inputs/modexp.txt new file mode 100644 index 000000000000..a6afb998558e --- /dev/null +++ b/tests/fuzzing/dc_inputs/modexp.txt @@ -0,0 +1,103 @@ +0 0 1|pR +1 0 1|pR +1 0 2|pR +0 10 1|pR +1 293 1|pR +1 2789365 2|pR +100 8 7|pR +10922384 15031007 201|pR +3346529 189 254|pR +4113416930 197 14|pR +7709 5887 111|pR +5487406 3252 128|pR +2080527 2279453822 219|pR +48895 50678 232|pR +1535808383 2902995144 18|pR +8437837 2882198 69|pR +35363 25806 2|pR +3221177403 1560419989 189|pR +227 42775 163|pR +2811398069 37500 173|pR +15046850 3859895697 195|pR +15770756 3621999893 119|pR +6937927 3719297189 183|pR +12573 43819 209|pR +42098463 7584603 136|pR +8656683 1328292415 226|pR +209 81 157|pR +141 13317429 26|pR +809485795 60745 101|pR +4882 1388217898 38|pR +750704 78 119|pR +668879580 2888860497 179|pR +1152725844 15295742 154|pR +16160694 8981529 154|pR +216 102 3|pR +3691227289 5344109 232|pR +2195559299 61 222|pR +2478990626 13007440 30|pR +45083 44 117|pR +224 55824 53|pR +1372700133 89 94|pR +205 10422 48|pR +11887 12 73|pR +5955 24353 114|pR +1201697310 789722419 6|pR +56577 231 229|pR +96 38841 189|pR +6529661 5636520 209|pR +11005 15955685 27|pR +9709 231 132|pR +59790 1034579699 166|pR +47892 14536879 79|pR +48 208 21|pR +33036 3877 65|pR +164 6527085 249|pR +12146850 224 37|pR +218 16425679 62|pR +51 27641 95|pR +3076735605 49154 32|pR +515652717 4117874315 143|pR +300672671 720768884 110|pR +9422066 206 5|pR +43 97 13|pR +545174510 65319 126|pR +3317462730 704990271 51|pR +47316 23231 202|pR +7236571 4379567 106|pR +2584584521 2459274189 29|pR +61562 5035178 178|pR +65302 112 151|pR +63040 2168854052 213|pR +9039611 2370306559 62|pR +16414384 1020652061 83|pR +7491 3853569905 172|pR +1180322494 46670 84|pR +3823343557 3865107254 127|pR +6240872 55335 39|pR +2281401897 1098411 251|pR +61 2949190429 231|pR +8981024 162 43|pR +1 3568883218 212|pR +4217100969 3471787779 8|pR +3232237 13 243|pR +29280 3972452706 100|pR +13077 6431923 216|pR +104 3098510775 140|pR +9503298 174 242|pR +3424695712 12184 23|pR +184 15066347 151|pR +2935856 14003205 184|pR +1386637762 2128151420 71|pR +154 11960656 12|pR +743976432 4004778779 136|pR +3909160595 3575680922 21|pR +26133 3580 147|pR +409154 170 68|pR +149 55629 40|pR +5753 13776176 32|pR +3831447473 658273178 98|pR +1527252003 2300622 207|pR +3363824553 8244645 215|pR +20 145 101|pR +4005077294 2196555621 94|pR diff --git a/tests/fuzzing/dc_inputs/modulus.txt b/tests/fuzzing/dc_inputs/modulus.txt new file mode 100644 index 000000000000..613944b2001a --- /dev/null +++ b/tests/fuzzing/dc_inputs/modulus.txt @@ -0,0 +1,70 @@ +20k +1 1%pR +2 1%pR +16 4%pR +15 4%pR +17 4%pR +2389473 5%pR +39240687239 1%pR +346728934 23958%pR +3496723859067234 298375462837546928347623059375486%pR +_1 1%pR +_2 1%pR +_47589634875689345 37869235%pR +_1274852934765 2387628935486273546%pR +_6324758963 237854962%pR +1 _1%pR +2 _1%pR +2 _2%pR +2 _3%pR +16 5%pR +15 5%pR +14 5%pR +89237423 _237856923854%pR +123647238946 _12467%pR +_1 _1%pR +_2 _1%pR +_2 _2%pR +_2 _3%pR +_13 _7%pR +_14 _7%pR +_15 _7%pR +_12784956 _32746%pR +_127849612 _23712347682193%pR +0k +1 1%pR +2 1%pR +16 4%pR +15 4%pR +17 4%pR +2389473 5%pR +39240687239 1%pR +346728934 23958%pR +3496723859067234 298375462837546928347623059375486%pR +_1 1%pR +_2 1%pR +_47589634875689345 37869235%pR +_1274852934765 2387628935486273546%pR +_6324758963 237854962%pR +1 _1%pR +2 _1%pR +2 _2%pR +2 _3%pR +16 5%pR +15 5%pR +14 5%pR +89237423 _237856923854%pR +123647238946 _12467%pR +_1 _1%pR +_2 _1%pR +_2 _2%pR +_2 _3%pR +_13 _7%pR +_14 _7%pR +_15 _7%pR +_12784956 _32746%pR +_127849612 _23712347682193%pR +_3191280681 641165986%pR +0k _899510228 _2448300078.40314%pR +0k _7424863 _207.2609738667%pR +0k 3769798918 0.6%pR diff --git a/tests/fuzzing/dc_inputs/multiply.txt b/tests/fuzzing/dc_inputs/multiply.txt new file mode 100644 index 000000000000..1f9041d06ea7 --- /dev/null +++ b/tests/fuzzing/dc_inputs/multiply.txt @@ -0,0 +1,42 @@ +0 0*pR +0.000 0*pR +1 0*pR +0 1*pR +0 2498752389672835476*pR +873246913745129084576134 0*pR +1 472638590273489273456*pR +12374861230476103672835496 1*pR +1 1*pR +2 1*pR +1 2*pR +2 2*pR +3 14*pR +17 8*pR +1892467513846753 1872439821374591038746*pR +328962735862.2973546835638947635 1728465791348762356*pR +38745962374538.387427384672934867234 0.1932476528394672837568923754*pR +9878894576289457634856.2738627161689017387608947567654 37842939768237596237854203.29874372139852739126739621793162*pR +_1 1*pR +_1 2*pR +78893457 _34876238956*pR +235678324957634 _0.2349578349672389576*pR +_12849567821934 12738462937681*pR +1274861293467.927843682937462 _28935678239*pR +2936077239872.12937462836 _0.012842357682435762*pR +2387692387566.2378569237546 _272189345628.123875629835876*pR +0.012348629356782835962 _23487692356*pR +0.4768349567348675934 _0.23756834576934857638495*pR +0.98748395367485962735486 _4675839462354867.376834956738456*pR +_321784627934586 _235762378596*pR +_32578623567892356 _0.32567384579638456*pR +_35768232346876 _2348672935602387620.28375682349576237856*pR +_0.2356728394765234 _238759624356978*pR +_0.2345768212346780 _0.235768124697074385948943532045*pR +_0.370873860736785306278630 _7835678398607.7086378076867096270*pR +_78365713707.7089637863786730 _738580798679306780*pR +_73867038956790490258249 _0.7379862716391723672803679*pR +_378621971598721837710387 _98465373878350798.09743896037963078560*pR +37164201 2931559660*pR +679468076118972457796560530571.46287161642138401685 93762.2836*pR +.000000000000000000000000001 .0000000000000000000000001*pR +239 289 _98 .8937 _.1893 28937*****pR diff --git a/tests/fuzzing/dc_inputs/places.txt b/tests/fuzzing/dc_inputs/places.txt new file mode 100644 index 000000000000..308ff1373d64 --- /dev/null +++ b/tests/fuzzing/dc_inputs/places.txt @@ -0,0 +1,14 @@ +0 0@pR +1 0@pR +2 0@pR +0.0023896 0@pR +1.298346 0@pR +2.00000000 0@pR +0.0023896 3@pR +1.298346 4@pR +2.00000000 5@pR +289 3@pR +18.34 6@pR +_183.1 0@pR +_23.238 8@pR +_343.23 2@pR diff --git a/tests/fuzzing/dc_inputs/power.txt b/tests/fuzzing/dc_inputs/power.txt new file mode 100644 index 000000000000..955e42557a15 --- /dev/null +++ b/tests/fuzzing/dc_inputs/power.txt @@ -0,0 +1,36 @@ +20k +0 0^pR +0 1^pR +0 1894^pR +1 0^pR +39746823 0^pR +0.238672983047682 0^pR +18394762374689237468.97354862973846 0^pR +1 1^pR +2 1^pR +18927361346 1^pR +0.23523785962738592635777 1^pR +328956734869213746.89782398457234 1^pR +8937 8^pR +93762.2836 3^pR +1 _1^pR +2 _1^pR +10 _1^pR +683734768 _1^pR +38579623756.897937568235 _1^pR +1 _32467^pR +2 _53^pR +_1 1^pR +_1 2^pR +_2 1^pR +_2 2^pR +_237 294^pR +_3746 28^pR +_0.3548 35^pR +_1 _1^pR +_1 _2^pR +_2 _1^pR +_2 _2^pR +_86 _7^pR +0 _251^pR +_0.2959371298 27^pR diff --git a/tests/fuzzing/dc_inputs/quit.dc b/tests/fuzzing/dc_inputs/quit.dc new file mode 100644 index 000000000000..81e6289af25b --- /dev/null +++ b/tests/fuzzing/dc_inputs/quit.dc @@ -0,0 +1,2 @@ +1se [li p 1+si le li !=lem]sl [lk p 1+sk le lk !=o]so [0sk lox leQ 0sk lox le 3*1+Q 0sk lox]sm [0si llx le 1+se 10 le !=n]dsnx +1si [li p 1+si 10 li !=set]ss [1000Q]st lsx diff --git a/tests/fuzzing/dc_inputs/scientific.txt b/tests/fuzzing/dc_inputs/scientific.txt new file mode 100644 index 000000000000..240473b0bbca --- /dev/null +++ b/tests/fuzzing/dc_inputs/scientific.txt @@ -0,0 +1,55 @@ +0e0pR +0e1pR +0e5pR +0e_2pR +0e_100pR +1e0pR +_1e1pR +1e9pR +_1e21pR +1e_1pR +_1e_2pR +1e_5pR +4.92837e5pR +_3.28971028e20pR +6.2e3pR +_8.289371e2pR +5.9817280937e8pR +_3.28977e_1pR +8.8927891e_20pR +_7.98239e_4pR +4.4892e_4pR +_18937e0pR +198273e10pR +_18927e_4pR +28937e_5pR +_891072e_7pR +.28972e0pR +_.891273e_1pR +.8928397e1pR +_.0002983172e5pR +.00022e3pR +_.00022e4pR +.0000328937e8pR +82938.29873e8.82\ +937pRpR +2893e2\ +.389pRpR +0o +0pR +1pR +10pR +_289pR +2894pR +_89434pR +894370pR +_1239839pR +28931708pR +_8052098.8029731809pR +.1pR +_.01pR +.001pR +_.00038pR +.0000483pR +_.0002894378190pR +.2893712083pR diff --git a/tests/fuzzing/dc_inputs/shift.txt b/tests/fuzzing/dc_inputs/shift.txt new file mode 100644 index 000000000000..628b0a5bf6fe --- /dev/null +++ b/tests/fuzzing/dc_inputs/shift.txt @@ -0,0 +1,42 @@ +0 0HpR +1 0HpR +2 0HpR +0.0023896 0HpR +1.298346 0HpR +2.00000000 0HpR +0.0023896 3HpR +1.298346 4HpR +2.00000000 5HpR +89136.892348976 7HpR +1892634051829351283289298 24HpR +0 0hpR +1 0hpR +2 0hpR +0.0023896 0hpR +1.298346 0hpR +2.00000000 0hpR +0.0023896 3hpR +1.298346 4hpR +2.00000000 5hpR +89136.892348976 7hpR +1892634051829351283289298 24hpR +_1 0HpR +_2 0HpR +_0.0023896 0HpR +_1.298346 0HpR +_2.00000000 0HpR +_0.0023896 3HpR +_1.298346 4HpR +_2.00000000 5HpR +_89136.892348976 7HpR +_1892634051829351283289298 24HpR +_1 0hpR +_2 0hpR +_0.0023896 0hpR +_1.298346 0hpR +_2.00000000 0hpR +_0.0023896 3hpR +_1.298346 4hpR +_2.00000000 5hpR +_89136.892348976 7hpR +_1892634051829351283289298 24hpR diff --git a/tests/fuzzing/dc_inputs/sqrt.txt b/tests/fuzzing/dc_inputs/sqrt.txt new file mode 100644 index 000000000000..7c13fdd0bb5d --- /dev/null +++ b/tests/fuzzing/dc_inputs/sqrt.txt @@ -0,0 +1,14 @@ +20k +0vpR +2vpR +4vpR +9vpR +16vpR +25vpR +121vpR +48765vpR +9287356207356vpR +0.189274385967238956872354vpR +12389467137496823.134567829387456283946vpR +.0000000000000000000000000000123vpR +1vpR diff --git a/tests/fuzzing/dc_inputs/stack_len.txt b/tests/fuzzing/dc_inputs/stack_len.txt new file mode 100644 index 000000000000..1b367f3affa8 --- /dev/null +++ b/tests/fuzzing/dc_inputs/stack_len.txt @@ -0,0 +1,15 @@ +zp +zp +zp +zp +sa +yap +Sa +yap +Sa +yapR +La +yapR +La +yap +zp diff --git a/tests/fuzzing/dc_inputs/stdin.txt b/tests/fuzzing/dc_inputs/stdin.txt new file mode 100644 index 000000000000..7bf8316b99af --- /dev/null +++ b/tests/fuzzing/dc_inputs/stdin.txt @@ -0,0 +1,205 @@ +0si[lid:rli1+sili10>x]dsxxli1-si[li;rpRli1-sili0!>x]dsxxli1+si[li;rpRli1+sili10>x]dsxx0sx0si +1 2+p +[foo] +0 +1+p +2+p +3+p +4+p +5+p +6+p +7+p +8+p +9+p +10+p +11+p +12+p +13+p +14+p +15+p +16+p +17+p +18+p +19+p +20+p +21+p +22+p +23+p +24+p +25+p +26+p +27+p +28+p +29+p +30+p +31+p +32+p +33+p +34+p +35+p +36+p +37+p +38+p +39+p +40+p +41+p +42+p +43+p +44+p +45+p +46+p +47+p +48+p +49+p +50+p +51+p +52+p +53+p +54+p +55+p +56+p +57+p +58+p +59+p +60+p +61+p +62+p +63+p +64+p +65+p +66+p +67+p +68+p +69+p +70+p +71+p +72+p +73+p +74+p +75+p +76+p +77+p +78+p +79+p +80+p +81+p +82+p +83+p +84+p +85+p +86+p +87+p +88+p +89+p +90+p +91+p +92+p +93+p +94+p +95+p +96+p +97+p +98+p +99+p +100+p +101+p +102+p +103+p +104+p +105+p +106+p +107+p +108+p +109+p +110+p +111+p +112+p +113+p +114+p +115+p +116+p +117+p +118+p +119+p +120+p +121+p +122+p +123+p +124+p +125+p +126+p +127+p +128+p +129+p +130+p +131+p +132+p +133+p +134+p +135+p +136+p +137+p +138+p +139+p +140+p +141+p +142+p +143+p +144+p +145+p +146+p +147+p +148+p +149+p +150+p +151+p +152+p +153+p +154+p +155+p +156+p +157+p +158+p +159+p +160+p +161+p +162+p +163+p +164+p +165+p +166+p +167+p +168+p +169+p +170+p +171+p +172+p +173+p +174+p +175+p +176+p +177+p +178+p +179+p +180+p +181+p +182+p +183+p +184+p +185+p +186+p +187+p +188+p +189+p +190+p +191+p +192+p +193+p +194+p +195+p +196+p +197+p +198+p +199+p +200+p +p diff --git a/tests/fuzzing/dc_inputs/stream.dc b/tests/fuzzing/dc_inputs/stream.dc new file mode 100644 index 000000000000..5c61e7c931f9 --- /dev/null +++ b/tests/fuzzing/dc_inputs/stream.dc @@ -0,0 +1,2 @@ +#! /usr/bin/dc +0si[liPlid1+sili4096>x]ddsxPx diff --git a/tests/fuzzing/dc_inputs/strings.txt b/tests/fuzzing/dc_inputs/strings.txt new file mode 100644 index 000000000000..460976abbd9e --- /dev/null +++ b/tests/fuzzing/dc_inputs/strings.txt @@ -0,0 +1,51 @@ +[Hello, World!]ZpR +[Hello, World!]pR +[Hello, \[ World!]ZpR +[Hello, \[ World!]pR +[Hello, \] World!]ZpR +[Hello, \] World!]pR +[30pR] +[29pR] +[28pR] +[27pR] +[26pR] +[25pR] +[24pR] +[23pR] +[22pR] +[21pR] +[20pR] +[19pR] +[18pR] +[17pR] +[16pR] +[15pR] +[14pR] +[13pR] +[12pR] +[11pR] +[10pR] +[9pR] +[8pR] +[7pR] +[6pR] +[5pR] +[4pR] +[3pR] +[2pR] +[1pR] +[xz0<x]dsxx +[\\]pR +[\[\]]pR +1xpR +[1st] 0:b [2nd] 1:b 0;b p 1;b p +[string]XpR +[3 4^pR]silix +[[[q 1 3+pR]x]x]x4 5^pR +4xpR +5 112ax 90ax 112ax 82ax +[\q] pR +[q\\] pR +[\\] pR +92 a pR +[[10pR]si]x [[lix]x]x diff --git a/tests/fuzzing/dc_inputs/subtract.txt b/tests/fuzzing/dc_inputs/subtract.txt new file mode 100644 index 000000000000..2cb4104fb717 --- /dev/null +++ b/tests/fuzzing/dc_inputs/subtract.txt @@ -0,0 +1,33 @@ +0 0-pR +0 1-pR +1 0-pR +1 1-pR +5 2-pR +2 9-pR +321974 12845976238457-pR +2874519803456710938465 384723854-pR +10000000000000000000000000000000000000000 999999999999999999999999999999999999999-pR +10000000000000000000000000000000000000000 9999999999999999999999999999999999999999-pR +10000000000000000000000000000000000000000 999999999999999999999999999999999999999.99999999999999999999999999999999999-pR +10000000000000000000000000000000000000000 9999999999999999999999999999999999999999.9999999999999999999999999999999999-pR +10000000000000000000000000000000000000000 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000001-pR +10000000000000000000000000000000000000001 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000001-pR +10000000000000000000000000000000000000000.0000000001 0.0000000000000000000000000000000000000000000000000000000000000000000000000001-pR +_2 6-pR +_23784692345 182934721309467230894628735496027345-pR +_224352354962873059862 _1245723576829456278354960278345-pR +_3468273598 _12354243-pR +_0.92345768293 _2354768923-pR +_712384634.123476823 _24768293376-pR +_1879234638 _0.917234869234-pR +_0.9172438692134 _0.971284967124-pR +_0.1283475123465 _0.937462346-pR +_124765829346.2837468293562 _0.923467829346-pR +_12476829385769 _1928476259034.8378629356-pR +_0.38476284395876345 _94875394587623.2357869324857-pR +_4674596708467.34754789403674343567 _48672394852354698.237548629345-pR +979519669 3018100865-pR +929002449 3280677283-pR +0 _525898-pR +3 _3-pR +2 _1 2893714 _2189367411289 _.8921374 3.9201384----pR diff --git a/tests/fuzzing/dc_inputs/vars.txt b/tests/fuzzing/dc_inputs/vars.txt new file mode 100644 index 000000000000..bbe73b47d81f --- /dev/null +++ b/tests/fuzzing/dc_inputs/vars.txt @@ -0,0 +1,2 @@ +298734.8921702348sx_928374892.28937syzpRlxly+pR +298734.8921702348S xotj _928374892.28937S yotp zpRl xotj l yotp-pRzpR L xotj L yotp-pR diff --git a/tests/fuzzing/dc_inputs/weird.dc b/tests/fuzzing/dc_inputs/weird.dc new file mode 100644 index 000000000000..391ec05d6282 --- /dev/null +++ b/tests/fuzzing/dc_inputs/weird.dc @@ -0,0 +1,2 @@ +#! /usr/bin/dc +zp198202389.289374pzp[He World!]SzpzXfrfxzpfR diff --git a/tests/other.sh b/tests/other.sh index bd0014641846..64ba877a20c0 100755 --- a/tests/other.sh +++ b/tests/other.sh @@ -152,16 +152,19 @@ if [ "$d" = "bc" ]; then printf '5\n0\n' > "$redefine_res" "$exe" "$@" --redefine=print -e 'define print(x) { x }' -e 'print(5)' > "$redefine_out" + err="$?" checktest "$d" "$err" "keyword redefinition" "$redefine_res" "$redefine_out" "$exe" "$@" -r "abs" -r "else" -e 'abs = 5;else = 0' -e 'abs;else' > "$redefine_out" + err="$?" checktest "$d" "$err" "keyword redefinition" "$redefine_res" "$redefine_out" if [ "$extra_math" -ne 0 ]; then "$exe" "$@" -lr abs -e "perm(5, 1)" -e "0" > "$redefine_out" + err="$?" checktest "$d" "$err" "keyword not redefined in builtin library" "$redefine_res" "$redefine_out" @@ -178,6 +181,53 @@ if [ "$d" = "bc" ]; then checkerrtest "$d" "$err" "Keyword redefinition error without BC_REDEFINE_KEYWORDS" "$redefine_out" "$d" printf 'pass\n' + printf 'Running multiline comment expression file test...' + + multiline_expr_res="" + multiline_expr_out="$outputdir/bc_outputs/multiline_expr_results.txt" + + # tests/bc/misc1.txt happens to have a multiline comment in it. + "$exe" "$@" -f "$testdir/bc/misc1.txt" > "$multiline_expr_out" + err="$?" + + checktest "$d" "$err" "multiline comment in expression file" "$testdir/bc/misc1_results.txt" \ + "$multiline_expr_out" + + printf 'pass\n' + printf 'Running multiline comment expression file error test...' + + "$exe" "$@" -f "$testdir/bc/errors/05.txt" 2> "$multiline_expr_out" + err="$?" + + checkerrtest "$d" "$err" "multiline comment in expression file error" \ + "$multiline_expr_out" "$d" + + printf 'pass\n' + printf 'Running multiline string expression file test...' + + # tests/bc/strings.txt happens to have a multiline string in it. + "$exe" "$@" -f "$testdir/bc/strings.txt" > "$multiline_expr_out" + err="$?" + + checktest "$d" "$err" "multiline string in expression file" "$testdir/bc/strings_results.txt" \ + "$multiline_expr_out" + + printf 'pass\n' + printf 'Running multiline string expression file error test...' + + "$exe" "$@" -f "$testdir/bc/errors/16.txt" 2> "$multiline_expr_out" + err="$?" + + checkerrtest "$d" "$err" "multiline string in expression file with backslash error" \ + "$multiline_expr_out" "$d" + + "$exe" "$@" -f "$testdir/bc/errors/04.txt" 2> "$multiline_expr_out" + err="$?" + + checkerrtest "$d" "$err" "multiline string in expression file error" \ + "$multiline_expr_out" "$d" + + printf 'pass\n' else |