src/runtime: fix nil map dereference

Operations on nil maps are accepted and shouldn't
panic. The base hashmapGet/hashmapDelete handled
nil-maps correctly, but the hashmapBinary versions
could segfault accessing the nil map while trying
to hash the key.

Fixes #2341
This commit is contained in:
Damian Gryski
2021-12-07 22:31:07 -08:00
committed by Ron Evans
parent cfe6b9765f
commit d6c892fe7b
3 changed files with 13 additions and 0 deletions
+1
View File
@@ -53,6 +53,7 @@ true false 0
nilmap: 0
4
42
nilbinmap: 0
4321
5555
itfMap[3]: 0