Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

map_deinit crash after map_init without add any values #11

Open
GF-Huang opened this issue Aug 19, 2019 · 1 comment
Open

map_deinit crash after map_init without add any values #11

GF-Huang opened this issue Aug 19, 2019 · 1 comment

Comments

@GF-Huang
Copy link

map_init(&m);
map_deinit(&m);  // crash

image

@catlause
Copy link

map_init will set m->nbuckets to 0, how could you step into the while loop without any map_set_ operations?

#define map_init(m)\
  memset(m, 0, sizeof(*(m)))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants