zig/test/cases/safety
Eric Joldasov 50339f595a all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-19 12:34:42 -07:00
..
@alignCast misaligned.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
@asyncCall with too small a frame.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
@enumFromInt - no matching tag value.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
@errSetCast error not present in destination.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
@intCast to u0.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
@intFromFloat cannot fit - negative out of range.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
@intFromFloat cannot fit - negative to unsigned.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
@intFromFloat cannot fit - positive out of range.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
@ptrFromInt address zero to non-optional byte-aligned pointer.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
@ptrFromInt address zero to non-optional pointer.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
@ptrFromInt with misaligned address.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
@tagName on corrupted enum value.zig Sema: implement comptime @memset 2023-04-25 11:23:41 -07:00
@tagName on corrupted union value.zig Sema: implement comptime @memset 2023-04-25 11:23:41 -07:00
array slice sentinel mismatch non-scalar.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
array slice sentinel mismatch vector.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
array slice sentinel mismatch.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
awaiting twice.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
bad union field access.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
calling panic.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
cast []u8 to bigger slice of wrong size.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
cast integer to global error and no code matches.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
empty slice with sentinel out of bounds.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
error return trace across suspend points.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
exact division failure - vectors.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
exact division failure.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
for_len_mismatch_three.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
for_len_mismatch.zig add safety test cases for multi-object for loops 2023-02-18 19:20:19 -07:00
integer addition overflow.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
integer division by zero - vectors.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
integer division by zero.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
integer multiplication overflow.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
integer negation overflow.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
integer subtraction overflow.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
invalid resume of async function.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
memcpy_alias.zig update test cases for new memcpy/memset semantics 2023-04-25 11:23:41 -07:00
memcpy_len_mismatch.zig update test cases for new memcpy/memset semantics 2023-04-25 11:23:41 -07:00
memset_array_undefined_bytes.zig update test cases for new memcpy/memset semantics 2023-04-25 11:23:41 -07:00
memset_array_undefined_large.zig update test cases for new memcpy/memset semantics 2023-04-25 11:23:41 -07:00
memset_slice_undefined_bytes.zig update test cases for new memcpy/memset semantics 2023-04-25 11:23:41 -07:00
memset_slice_undefined_large.zig update test cases for new memcpy/memset semantics 2023-04-25 11:23:41 -07:00
modrem by zero.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
modulus by zero.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
noreturn returned.zig add runtime safety for noreturn function returning 2023-05-16 11:33:38 +03:00
nosuspend function call, callee suspends.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
optional unwrap operator on C pointer.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
optional unwrap operator on null pointer.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
out of bounds slice access.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
pointer casting null to non-optional pointer.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
pointer casting to null function pointer.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
pointer slice sentinel mismatch.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
remainder division by zero.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
resuming a function which is awaiting a call.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
resuming a function which is awaiting a frame.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
resuming a non-suspended function which has been suspended and resumed.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
resuming a non-suspended function which never been suspended.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
shift left by huge amount.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
shift right by huge amount.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
signed integer division overflow - vectors.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
signed integer division overflow.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
signed integer not fitting in cast to unsigned integer - widening.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
signed integer not fitting in cast to unsigned integer.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
signed shift left overflow.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
signed shift right overflow.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
signed-unsigned vector cast.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
slice sentinel mismatch - floats.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
slice sentinel mismatch - optional pointers.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00
slice slice sentinel mismatch.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
slice start index greater than end index.zig Sema: improve panic for slice start index being greater than end index 2022-11-29 15:47:02 +02:00
slice with sentinel out of bounds - runtime len.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
slice with sentinel out of bounds.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
slicing null C pointer - runtime len.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
slicing null C pointer.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
switch else on corrupt enum value - one prong.zig safety: add safety check for hitting else branch on a corrupt enum value 2022-10-07 11:04:02 +03:00
switch else on corrupt enum value - union.zig safety: add safety check for hitting else branch on a corrupt enum value 2022-10-07 11:04:02 +03:00
switch else on corrupt enum value.zig safety: add safety check for hitting else branch on a corrupt enum value 2022-10-07 11:04:02 +03:00
switch on corrupted enum value.zig Sema: implement comptime @memset 2023-04-25 11:23:41 -07:00
switch on corrupted union value.zig update test cases for new memcpy/memset semantics 2023-04-25 11:23:41 -07:00
truncating vector cast.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
unreachable.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
unsigned integer not fitting in cast to signed integer - same bit count.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
unsigned shift left overflow.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
unsigned shift right overflow.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
unsigned-signed vector cast.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
unwrap error switch.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
unwrap error.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
value does not fit in shortening cast - u0.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
value does not fit in shortening cast.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
vector integer addition overflow.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
vector integer multiplication overflow.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
vector integer negation overflow.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
vector integer subtraction overflow.zig std: add return address parameter to panic fn 2022-09-20 19:05:00 -07:00
zero casted to error.zig all: zig fmt and rename "@XToY" to "@YFromX" 2023-06-19 12:34:42 -07:00