zig/lib/std
Gregory Anders cab9da35bd std: enable FailingAllocator to fail on resize
Now that allocator.resize() is allowed to fail, programs may wish to
test code paths that handle resize() failure. The simplest way to do
this now is to replace the vtable of the testing allocator with one
that uses Allocator.noResize for the 'resize' function pointer.

An alternative way to support this testing capability is to augment the
FailingAllocator (which is already useful for testing allocation failure
scenarios) to intentionally fail on calls to resize(). To do this, add a
'resize_fail_index' parameter to the FailingAllocator that causes
resize() to fail after the given number of calls.
2023-09-06 19:06:32 +03:00
..
atomic std: Rename TailQueue to DoublyLinkedList 2023-08-27 20:57:46 -07:00
Build Build: fail tests that log errors, like zig test does 2023-08-25 15:36:25 -07:00
c dragonfly: std.c: more decls 2023-08-15 17:29:35 -04:00
compress all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
crypto std.crypto.aead: Consistent decryption tail and doc fixes (#16781) 2023-08-14 21:39:51 +02:00
dwarf compiler: move unions into InternPool 2023-08-22 13:54:14 -07:00
event all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
fmt re-enable test "fmt.parseFloat nan and inf" after llvm fix 2023-07-25 11:03:11 -07:00
fs Temporarily disable Dir.statFile test when linking glibc 2023-08-31 18:01:15 -07:00
hash wyhash: keep tail bytes on iterative update 2023-08-05 15:30:50 -07:00
heap std: enable FailingAllocator to fail on resize 2023-09-06 19:06:32 +03:00
http std: Rename TailQueue to DoublyLinkedList 2023-08-27 20:57:46 -07:00
io Fix type mismatch for Reader.readIntoBoundedBytes (#16416) 2023-07-24 17:32:06 -07:00
json std: enable FailingAllocator to fail on resize 2023-09-06 19:06:32 +03:00
math AstGen: disallow '-0' integer literal 2023-08-21 11:47:31 +03:00
mem add error when passing a non-single-item pointer to allocator.destroy 2023-07-25 10:55:04 -07:00
meta all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
net std.net: Fix IPv6 address parsing for single digit 2023-09-06 11:14:24 +03:00
os Merge pull request #16977 from kcbanner/lib_getauxval_fixup 2023-09-04 09:11:15 +02:00
rand Use builtin inference over @as where possible 2023-07-24 10:23:51 -07:00
sort improve documentation of std.sort.*Context functions (#16145) 2023-06-27 00:51:06 -07:00
target all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
testing std: enable FailingAllocator to fail on resize 2023-09-06 19:06:32 +03:00
Thread Fix counting in SingleThreadedRwLock's tryLockShared (#16560) 2023-07-26 08:19:52 -05:00
time all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
tz
unicode all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
valgrind all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
zig darwin: move inference of SDK version into the linker 2023-08-29 06:43:41 +02:00
array_hash_map.zig std.ArrayHashMap.reIndex also recomputes hashes (#17054) 2023-09-02 17:00:20 -04:00
array_list.zig std: enable FailingAllocator to fail on resize 2023-09-06 19:06:32 +03:00
ascii.zig migration: std.math.{min, min3, max, max3} -> @min & @max 2023-06-16 13:44:09 -07:00
atomic.zig
base64.zig Optimize std.base64.standard.Encoder.encode 2023-08-29 16:00:31 -04:00
bit_set.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
BitStack.zig std.json: Unify stringify and writeStream (#16405) 2023-07-21 19:56:46 -04:00
bounded_array.zig Smaller memory footprint for BoundedArray (#16299) 2023-07-03 13:58:03 -04:00
buf_map.zig
buf_set.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
Build.zig std.Build: check for native CPU when serializing CrossTarget 2023-08-16 18:05:18 -07:00
builtin.zig std.os.uefi: reorganize namespaces 2023-08-24 22:38:47 -07:00
c.zig Revert "std.c: exposing timer api" 2023-07-31 10:51:44 -07:00
child_process.zig Windows: Fix TooManyParentDirs handling for paths that shouldn't be cwd-relative 2023-08-11 18:58:40 -07:00
coff.zig std.coff: Fixed compile error. 2023-09-02 00:18:53 +02:00
compress.zig
comptime_string_map.zig std.sort.block: add safety check for lessThan return value 2023-06-26 17:50:10 -07:00
crypto.zig std.crypto.ff - Alloc-free, constant-time field arithmetic for crypto (#15795) 2023-05-22 16:11:06 +02:00
cstr.zig std.cstr: deprecate namespace 2023-06-25 14:51:03 -07:00
debug.zig Merge pull request #16824 from mikdusan/bsd 2023-08-17 12:14:30 -07:00
dwarf.zig std: remove some unused imports (#16710) 2023-08-06 15:18:50 -04:00
dynamic_library.zig Windows: Fix TooManyParentDirs handling for paths that shouldn't be cwd-relative 2023-08-11 18:58:40 -07:00
elf.zig std: remove some unused imports (#16710) 2023-08-06 15:18:50 -04:00
enums.zig std.sort.block: add safety check for lessThan return value 2023-06-26 17:50:10 -07:00
event.zig
fifo.zig std: remove some unused imports (#16710) 2023-08-06 15:18:50 -04:00
fmt.zig Make NaNs quiet by default and other NaN tidy-up (#16826) 2023-08-18 02:07:49 -04:00
fs.zig std.fs: Fix typo in accessAbsoluteW 2023-09-03 12:03:14 +02:00
hash.zig add std.hash.uint32 2023-06-10 20:42:30 -07:00
hash_map.zig std: remove some unused imports (#16710) 2023-08-06 15:18:50 -04:00
heap.zig std: remove some unused imports (#16710) 2023-08-06 15:18:50 -04:00
http.zig Fix the http.Server test and add it to the set of tests in http.zig 2023-07-23 13:58:34 -07:00
Ini.zig
io.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
json.zig std.json: Unify stringify and writeStream (#16405) 2023-07-21 19:56:46 -04:00
leb128.zig Use builtin inference over @as where possible 2023-07-24 10:23:51 -07:00
linked_list.zig std: Move TailQueue alias to correct namespace 2023-08-28 17:41:37 -07:00
log.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
macho.zig macho: add helper for accessing tools array in LC_BUILD_VERSION cmd 2023-08-18 11:55:29 +02:00
math.zig Make NaNs quiet by default and other NaN tidy-up (#16826) 2023-08-18 02:07:49 -04:00
mem.zig std.mem.sliceAsBytes: support arrays of zero-bit types 2023-08-09 05:47:13 -04:00
meta.zig compiler: move unions into InternPool 2023-08-22 13:54:14 -07:00
multi_array_list.zig Add more sorting functions to MultiArrayList (#16377) 2023-07-11 06:37:51 +00:00
net.zig std.net: Fix IPv6 address parsing for single digit 2023-09-06 11:14:24 +03:00
once.zig
os.zig std.os+windows: isAtLeast(.win10_rs5) in renameatW(), DeleteFile() for posix semantics 2023-09-03 08:35:26 +02:00
packed_int_array.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
pdb.zig std.pdb: fix incorrect field alignment in ptrCast 2023-06-30 23:23:03 -04:00
priority_dequeue.zig [priority_dequeue] Fix out-of-bounds access 2023-06-22 02:03:53 -07:00
priority_queue.zig [priority_queue] Simplify sifting & fix edge case 2023-07-24 12:58:19 -07:00
process.zig std.process.totalSystemMemory: return correct error type on FreeBSD 2023-08-01 19:27:04 -07:00
Progress.zig std.Progress: add optional unit to progress indicator 2023-07-25 13:51:22 +01:00
rand.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
RingBuffer.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
segmented_list.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
SemanticVersion.zig std: replace builtin.Version with SemanticVersion 2023-06-17 13:17:34 -07:00
simd.zig Remove len parameter from splat in standard lib 2023-07-12 15:35:57 -07:00
sort.zig improve documentation of std.sort.*Context functions (#16145) 2023-06-27 00:51:06 -07:00
start.zig Plan 9: add more features to std.os.plan9 2023-08-02 18:19:07 -04:00
start_windows_tls.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
std.zig std: Move TailQueue alias to correct namespace 2023-08-28 17:41:37 -07:00
tar.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
target.zig std.target: mark helper functions inline 2023-08-03 09:37:10 -07:00
testing.zig std: enable FailingAllocator to fail on resize 2023-09-06 19:06:32 +03:00
Thread.zig Merge pull request #16622 from jacobly0/cbe-asm-compat 2023-07-31 15:34:32 -07:00
time.zig implement std.time.sleep for uefi 2023-07-07 11:57:09 -07:00
treap.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
tz.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
unicode.zig std.json: Fix decoding of UTF-16 surrogate pairs (#16830) 2023-08-15 09:11:59 -04:00
Uri.zig std.Uri: Don't double-escape escaped query parameters (#16043) 2023-07-27 13:18:48 -04:00
valgrind.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
wasm.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
zig.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00