diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2019-04-06 14:15:12 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-04-07 15:47:09 -0400 |
| commit | 6a78b315b2112e372b48ba7399ea9cddadbe65b6 (patch) | |
| tree | 4d196cae30369468c1912139e6f8a7f720d45913 /src/codegen.cpp | |
| parent | 6715c54cc641e61405bb72d286fe2cf560447b56 (diff) | |
| download | zig-6a78b315b2112e372b48ba7399ea9cddadbe65b6.tar.gz zig-6a78b315b2112e372b48ba7399ea9cddadbe65b6.zip | |
Fix std.HashMap.remove returning incorrect KV
Now returns a copy of the removed kv instead of a pointer to the removed kv. The removed kv gets overwritten when shifting the hash map after the removal, so returning a pointer to it will have another kv's values in it after the return.
This bug had some nasty downstream effects in things like BufSet and BufMap where delete would free a still in-use KV and leave the actually removed KV un-free'd.
Diffstat (limited to 'src/codegen.cpp')
0 files changed, 0 insertions, 0 deletions
