sentientwaffle
f04e65bc09
std.hash_map: fetchRemove increment available
...
To avoid leaking slots, `fetchRemove` must increment `available` (when the "fetch" succeeds).
Without the `available += 1`, the added test `"std.hash_map repeat fetchRemove"` fails with
run test std-x86-linux-none-Debug: error: thread 432734 panic: integer overflow
.../zig/lib/std/hash_map.zig:1365:28: 0x6471d5 in getOrPutAssumeCapacityAdapted__anon_47495 (test)
self.available -= 1;
^
.../zig/lib/std/hash_map.zig:1308:62: 0x616950 in getOrPutAssumeCapacityContext (test)
const result = self.getOrPutAssumeCapacityAdapted(key, ctx);
^
Alternatively, `fetchRemove` could call `removeByIndex`, though that would entail calling `header()` twice instead of once.
2023-06-10 02:24:35 +03:00
..
2023-04-30 18:16:04 -07:00
2023-06-03 13:51:02 -07:00
2023-05-29 22:08:43 +03:00
2023-05-23 17:55:59 -07:00
2023-06-06 09:08:57 +02:00
2022-05-09 18:51:46 +02:00
2023-05-25 20:17:07 +01:00
2023-06-01 00:02:16 +03:00
2023-06-03 13:51:02 -07:00
2023-06-07 19:27:17 -07:00
2023-04-30 18:16:04 -07:00
2023-06-03 13:51:02 -07:00
2023-06-03 13:38:23 -07:00
2023-05-13 14:31:53 -04:00
2023-06-01 00:02:16 +03:00
2023-04-28 13:24:43 -07:00
2023-04-12 12:06:19 -04:00
2023-05-08 10:59:06 +03:00
2023-05-30 13:22:13 +02:00
2023-05-22 20:33:35 +02:00
2023-05-23 17:55:59 -07:00
2023-05-08 07:36:20 -04:00
2023-04-28 13:24:43 -07:00
2023-05-20 12:27:48 -07:00
2022-01-01 12:47:08 +00:00
2022-12-13 13:14:20 +02:00
2023-04-30 18:16:04 -07:00
2023-06-03 13:51:02 -07:00
2023-04-28 13:24:43 -07:00
2023-05-07 15:55:21 +10:00
2023-02-18 19:17:21 -07:00
2023-04-21 23:08:48 -04:00
2023-04-28 13:24:43 -07:00
2023-04-28 13:24:43 -07:00
2023-05-07 15:55:21 +10:00
2023-04-22 13:09:15 +03:00
2023-04-28 13:24:43 -07:00
2023-06-03 13:51:02 -07:00
2023-06-03 13:51:02 -07:00
2023-06-03 13:45:52 -07:00
2023-06-03 13:51:02 -07:00
2023-02-18 19:17:21 -07:00
2023-02-22 00:11:20 +11:00
2023-05-23 17:55:59 -07:00
2023-05-22 16:11:06 +02:00
2023-04-28 13:24:43 -07:00
2023-05-29 16:29:19 -07:00
2023-05-29 11:28:39 -07:00
2023-04-28 13:24:43 -07:00
2023-05-07 09:09:19 +02:00
2023-05-23 17:55:59 -07:00
2023-04-28 13:24:43 -07:00
2023-06-07 10:34:25 -04:00
2023-06-03 13:51:02 -07:00
2023-06-10 02:24:35 +03:00
2023-04-21 23:08:48 -04:00
2023-04-30 18:16:04 -07:00
2023-05-06 21:35:15 -05:00
2023-01-11 15:39:48 -08:00
2023-05-24 10:15:02 +01:00
2023-05-13 14:31:53 -04:00
2022-12-27 15:13:14 +02:00
2023-04-30 18:16:04 -07:00
2023-05-03 11:19:37 +03:00
2023-04-30 18:16:04 -07:00
2023-05-29 13:01:54 +03:00
2023-06-03 13:51:02 -07:00
2023-05-23 17:55:59 -07:00
2023-05-29 23:06:08 +01:00
2023-06-03 13:51:02 -07:00
2023-02-18 19:17:21 -07:00
2023-06-03 13:51:02 -07:00
2023-04-30 18:16:04 -07:00
2023-04-30 18:16:04 -07:00
2023-05-08 10:59:06 +03:00
2023-02-18 19:17:21 -07:00
2023-05-13 13:45:05 -07:00
2023-04-28 13:24:43 -07:00
2023-04-23 21:06:21 +03:00
2023-04-23 21:06:21 +03:00
2023-04-28 13:24:43 -07:00
2023-05-13 13:45:05 -07:00
2023-05-13 13:35:50 +03:00
2023-05-23 17:55:59 -07:00
2023-01-29 15:04:13 -05:00
2023-05-01 19:22:52 -04:00
2023-03-17 17:50:25 +01:00
2023-04-28 13:24:43 -07:00
2023-05-26 21:42:19 -07:00
2023-05-29 23:06:08 +01:00
2023-05-25 14:32:17 -05:00
2023-04-30 18:16:04 -07:00
2022-04-15 17:01:01 -05:00
2023-04-28 13:24:43 -07:00
2023-05-07 15:55:21 +10:00
2023-05-06 21:35:15 -05:00
2022-11-19 19:32:45 -07:00
2023-03-18 20:13:30 +01:00
2023-03-15 10:48:13 -07:00