aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGavin Howard <gavin@yzena.com>2021-07-25 14:02:41 -0600
committerGavin Howard <gavin@yzena.com>2021-07-25 14:07:32 -0600
commitfb9aa55a471bfabd959fe68974c2c371d7354493 (patch)
treeca6c613b401d423b6bf07c438dc8116bd6cdd405 /tests
parentb1d02e30947e056b82e2bcd307ee44cda1ade238 (diff)
downloadplatform_external_bc-fb9aa55a471bfabd959fe68974c2c371d7354493.tar.gz
platform_external_bc-fb9aa55a471bfabd959fe68974c2c371d7354493.tar.bz2
platform_external_bc-fb9aa55a471bfabd959fe68974c2c371d7354493.zip
Fix a crash in dc found by AFL++
This crash was caused by cleaning constants in other "functions" (strings). It happened when a string of exactly the same text was used again, which means it already had a function ready for it. Unfortunately, since that function had stored constants, it expected them to be there. They were not, as they had been cleaned. But they should not have been cleaned; only the constants in main should have been. I found the problem: dc was still using the main const slab for all constants, but it should not have been. This commit changes that. Signed-off-by: Gavin Howard <gavin@yzena.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/dc/errors/34.txt117
1 files changed, 117 insertions, 0 deletions
diff --git a/tests/dc/errors/34.txt b/tests/dc/errors/34.txt
new file mode 100644
index 00000000..902a38bc
--- /dev/null
+++ b/tests/dc/errors/34.txt
@@ -0,0 +1,117 @@
+0 lip1-si0l0+2o0sx_9lq+pR 0900pR
+_100900pR
+_10900p0bpR
+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
+16+p
+17+p
+18+p
+19.p
+20+p
+21+0+p
+71+xx0sx0s0
+1 2+p+p
+3o
+70+p
+70+p
+70+p
+70+p
+22+p
+20+p
+20+p
+20+p
+20+p
+x0+p
+20+p
+0 lip1-si0{0+2i0l0+200sx0.1009
+40+1+p
+4000pR
+_10900p0bpR
+1bp0
+.20bpR
+100000.002+p
+20+p
+20+p
+20+p
+20+p
+x0+p
+2000005bpR
+_10bpR
+_.10yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy00[l0;0;rpRl01+s0l010>x]dsxx0sx0s0
+1 2+p+p
+3+p
+4+p
+5+p
+6+p
+7+p
+8+p
+9+p
+10p
++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+xx0sx0s0
+1 2+p+p
+3o
+70+p
+70+p
+70+p
+70+p
+22+p
+20+p
+
+20+p
+30+p
+30+p
+30+p
+0b30+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
+5pR
+100000.0070000bpR
+^20+pR
+_.10100000.0070000bpR
+^20+pR
+_.1000Kl0;0;rpRl0