mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-28 14:24:43 +08:00
re PR go/61258 (gccgo: assertion failure go-map-delete.c:37 [GoSmith])
PR go/61258 runtime: Don't crash when deleting zero-sized key. From-SVN: r218702
This commit is contained in:
parent
967b254be1
commit
9ac18f8c2a
@ -35,7 +35,10 @@ __go_map_delete (struct __go_map *map, const void *key)
|
||||
key_descriptor = descriptor->__map_descriptor->__key_type;
|
||||
key_offset = descriptor->__key_offset;
|
||||
key_size = key_descriptor->__size;
|
||||
__go_assert (key_size != 0 && key_size != -1UL);
|
||||
if (key_size == 0)
|
||||
return;
|
||||
|
||||
__go_assert (key_size != -1UL);
|
||||
equalfn = key_descriptor->__equalfn;
|
||||
|
||||
key_hash = key_descriptor->__hashfn (key, key_size);
|
||||
|
Loading…
Reference in New Issue
Block a user