-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime safety (panic interface, slices) #19764
base: master
Are you sure you want to change the base?
Commits on Mar 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 94cc651 - Browse repository at this point
Copy the full SHA 94cc651View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a2df9d - Browse repository at this point
Copy the full SHA 8a2df9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f9e0050 - Browse repository at this point
Copy the full SHA f9e0050View commit details -
std.builtin: Added the standard library implementation for
panicNew
.Helper functions require standard library substitutes.
Configuration menu - View commit details
-
Copy full SHA for 886fd57 - Browse repository at this point
Copy the full SHA 886fd57View commit details -
std.multi_array_list: Rewrote
MultiArrayList.Slice.items
to notrequire the extreme slice edge-case: slice of comptime-known pointer with runtime-known end.
Configuration menu - View commit details
-
Copy full SHA for 51b75df - Browse repository at this point
Copy the full SHA 51b75dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for ff948d0 - Browse repository at this point
Copy the full SHA ff948d0View commit details -
type: Added function
allowSentinel
for determining whether an aggre……gate of type `ty` permits sentinels.
Configuration menu - View commit details
-
Copy full SHA for 15c882c - Browse repository at this point
Copy the full SHA 15c882cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f488c1f - Browse repository at this point
Copy the full SHA f488c1fView commit details -
Compilation: Added
runtime_safety
to cache. Currently using the'convenience' declaration of `runtime_safety`.
Configuration menu - View commit details
-
Copy full SHA for 9024015 - Browse repository at this point
Copy the full SHA 9024015View commit details -
* Added convenience declaration `runtime_safety`. * This value modified directly from the command line in `main.zig`. * This value is used to initialize `Builtin` options field `runtime_safety`.
Configuration menu - View commit details
-
Copy full SHA for e1050b8 - Browse repository at this point
Copy the full SHA e1050b8View commit details -
* Updated command line parser to parse controls for each panic cause compile command: `-funwrapped-error`, `-funwrapped-null`, `-freturned-noreturn`, `-freached-unreachable`, `-faccessed-out-of-bounds`, `-faccessed-out-of-order`, `-faccessed-inactive-field`, `-fdivided-by-zero`, `-fmemcpy-argument-aliasing`, `-fmismatched-memcpy-argument-lengths`, `-fmismatched-for-loop-capture-lengths`, `-fmismatched-sentinel`, `-fshift-amt-overflowed`, `-farith-overflowed`, `-fcast-truncated-data`, `-fcast-to-enum-from-invalid`, `-fcast-to-error-from-invalid`, `-fcast-to-pointer-from-invalid`, `-fcast-to-int-from-invalid`, `-fcast-to-unsigned-from-negative`. * Updated command line parser to parse convenience/test flags: `-fruntime-safety`, `-f[no-]analyze-slice2`.
Configuration menu - View commit details
-
Copy full SHA for 65ce79e - Browse repository at this point
Copy the full SHA 65ce79eView commit details -
Sema: Each of the following additions are to a sub-namespace `Runtime…
…Safety`. When testing is complete this namespace will be removed and all analogous functions in the file scope will be replaced. * Added helper functions: `preparePanicCause`, `failBlock`, `preparePanicExtraType`, `callBuiltinHelper`, `wantPanicCause`, `bestGenericIntType`, `resolveArithOverflowedPanicImpl`, `resolveArithOverflowedPanicCause`, `abiSizeOfContainingDecl`. * Added panic preparation functions: `panicWithMsg`, `panicReachedUnreachable`, `panicCastToEnumFromInvalid`, `panicUnwrappedError`, `checkAccessNullValue`, `checkUnwrappedError`, `checkDivisionByZero`, `checkAccessOutOfBounds`, `checkAccessOutOfOrder`, `checkAccessOutOfOrderExtra`, `checkAliasingMemcpyArguments`, `checkMismatchedMemcpyArgumentLengths`, `checkMismatchedForLoopCaptureLengths`, `checkAccessInactiveUnionField`, `checkMismatchedSentinel`, `checkMismatchedNullTerminator`, `checkShiftAmountOverflow`, `checkArithmeticOverflow`, `checkCastToEnumFromInvalid`, `checkCastToEnumFromInvalidHelper`, `checkCastToErrorFromInvalid`, `checkCastToErrorFromInvalidHelper`, `checkCastToPointerFromInvalid`, `checkCastToIntFromInvalid`, `checkCastTruncatedData`, `checkCastToUnsignedFromNegative`. * Added primary functions: `zirSliceStart`, `zirSliceEnd`, `zirSliceSentinel`, `zirSliceLength`, `analyzeSlice2`.
Configuration menu - View commit details
-
Copy full SHA for 6e29a90 - Browse repository at this point
Copy the full SHA 6e29a90View commit details -
Sema: Added compile errors for non-scalar sentinels in functions:
`zirReify`, `zirArrayTypeSentinel`, `zirPtrType`, `analyzeSlice`.
Configuration menu - View commit details
-
Copy full SHA for a65c226 - Browse repository at this point
Copy the full SHA a65c226View commit details -
Sema: Added optional usage of
analyzeSlice2
by functions:`zirSliceStart`, `zirSliceEnd`, `zirSliceSentinel`, and `zirSliceLength`.
Configuration menu - View commit details
-
Copy full SHA for b0e6394 - Browse repository at this point
Copy the full SHA b0e6394View commit details -
Sema: Added optional usage of
panicReachedUnreachable
by`Block.addUnreachable`.
Configuration menu - View commit details
-
Copy full SHA for d178d20 - Browse repository at this point
Copy the full SHA d178d20View commit details -
Configuration menu - View commit details
-
Copy full SHA for 11691df - Browse repository at this point
Copy the full SHA 11691dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 04d7b0e - Browse repository at this point
Copy the full SHA 04d7b0eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 436caf6 - Browse repository at this point
Copy the full SHA 436caf6View commit details -
Sema: Added optional usage of
checkCastToErrorFromInvalid
by `zirErrorFromInt`.
Configuration menu - View commit details
-
Copy full SHA for 64c2137 - Browse repository at this point
Copy the full SHA 64c2137View commit details -
Sema: Added optional usage of
checkCastToEnumFromInvalid
by`zirEnumFromInt`.
Configuration menu - View commit details
-
Copy full SHA for c51b932 - Browse repository at this point
Copy the full SHA c51b932View commit details -
Sema: Added optional usage of
checkAccessNullValue
by`analyzeOptionalPayloadPtr`.
Configuration menu - View commit details
-
Copy full SHA for 0844b72 - Browse repository at this point
Copy the full SHA 0844b72View commit details -
Sema: Added optional usage of
checkAccessNullValue
by`zirOptionalPayload`.
Configuration menu - View commit details
-
Copy full SHA for 901b465 - Browse repository at this point
Copy the full SHA 901b465View commit details -
Sema: Added optional usage of
checkUnwrappedError
by`analyzeErrUnionPayload`.
Configuration menu - View commit details
-
Copy full SHA for 00d73f8 - Browse repository at this point
Copy the full SHA 00d73f8View commit details -
Sema: Added optional usage of
checkUnwrappedError
by`analyzeErrUnionPayloadPtr`.
Configuration menu - View commit details
-
Copy full SHA for 7b733e7 - Browse repository at this point
Copy the full SHA 7b733e7View commit details -
Sema: Added optional usage of
checkCastTruncatedData
and`checkCastToUnsignedFromNegative` by `intCast`.
Configuration menu - View commit details
-
Copy full SHA for bc638a2 - Browse repository at this point
Copy the full SHA bc638a2View commit details -
Sema: Added optional usage of
checkCastToEnumFromInvalid
by`zirSwitchBlock`. This is potentially the wrong panic cause, but aligns more closely with the backend requirement.
Configuration menu - View commit details
-
Copy full SHA for 4563dc6 - Browse repository at this point
Copy the full SHA 4563dc6View commit details -
Sema: Added optional usage of
checkCastToEnumFromInvalid
and`panicReachedUnreachable` by `analyzeSwitchRuntimeBlock`.
Configuration menu - View commit details
-
Copy full SHA for c6d9548 - Browse repository at this point
Copy the full SHA c6d9548View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1bf37e6 - Browse repository at this point
Copy the full SHA 1bf37e6View commit details -
Sema: Added usage of
checkShiftAmountOverflow
and`checkArithmeticOverflow` by `zirShl`.
Configuration menu - View commit details
-
Copy full SHA for 9242dac - Browse repository at this point
Copy the full SHA 9242dacView commit details -
Sema: Added optional usage of
checkShiftAmountOverflow
and`checkArithmeticOverflow` by `zirShr`.
Configuration menu - View commit details
-
Copy full SHA for b9041bf - Browse repository at this point
Copy the full SHA b9041bfView commit details -
Sema: Added optional usage of
checkArithmeticOverflow
by`zirDivExact`.
Configuration menu - View commit details
-
Copy full SHA for 442a35f - Browse repository at this point
Copy the full SHA 442a35fView commit details -
Sema: Added optional usage of
checkArithmeticOverflow
by`addDivIntOverflowSafety`.
Configuration menu - View commit details
-
Copy full SHA for 8febf86 - Browse repository at this point
Copy the full SHA 8febf86View commit details -
Sema: Added optional usage of
checkDivisionByZero
by`addDivByZeroSafety`.
Configuration menu - View commit details
-
Copy full SHA for 39ddcd2 - Browse repository at this point
Copy the full SHA 39ddcd2View commit details -
Sema: Added optional usage of
checkArithmeticOverflow
by`analyzeArithmetic`.
Configuration menu - View commit details
-
Copy full SHA for 3f2a60f - Browse repository at this point
Copy the full SHA 3f2a60fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2cd6aa5 - Browse repository at this point
Copy the full SHA 2cd6aa5View commit details -
Sema: Added optional usage of
checkCastToIntFromInvalid
by`zirIntFromFloat`.
Configuration menu - View commit details
-
Copy full SHA for 67da75a - Browse repository at this point
Copy the full SHA 67da75aView commit details -
Sema: Added optional usage of
checkCastToPointerFromInvalid
by`zirPtrFromInt`.
Configuration menu - View commit details
-
Copy full SHA for 2ba80f4 - Browse repository at this point
Copy the full SHA 2ba80f4View commit details -
Sema: Added optional usage of
checkCastToErrorFromInvalid
by`zirErrorCast`.
Configuration menu - View commit details
-
Copy full SHA for 218209e - Browse repository at this point
Copy the full SHA 218209eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1fc3ed0 - Browse repository at this point
Copy the full SHA 1fc3ed0View commit details -
Sema: Added optional usage of
checkAliasingMemcpyArguments
,`checkMismatchedMemcpyArgumentLengths`, and `analyzeSlice2` by `zirMemcpy`.
Configuration menu - View commit details
-
Copy full SHA for b77bc3f - Browse repository at this point
Copy the full SHA b77bc3fView commit details -
Sema: Added optional usage of
checkAccessInactiveUnionField
by`unionFieldPtr`.
Configuration menu - View commit details
-
Copy full SHA for da5d75b - Browse repository at this point
Copy the full SHA da5d75bView commit details -
Sema: Added optional usage of
checkAccessInactiveUnionField
by`unionFieldVal`.
Configuration menu - View commit details
-
Copy full SHA for fdeb462 - Browse repository at this point
Copy the full SHA fdeb462View commit details -
Sema: Added optional usage of
checkAccessOutOfBounds
by`elemValArray`.
Configuration menu - View commit details
-
Copy full SHA for a706bf6 - Browse repository at this point
Copy the full SHA a706bf6View commit details -
Sema: Added optional usage of
checkAccessOutOfBounds
by`elemPtrArray`.
Configuration menu - View commit details
-
Copy full SHA for 8d52709 - Browse repository at this point
Copy the full SHA 8d52709View commit details -
Sema: Added optional usage of
checkAccessOutOfBounds
by`elemValSlice`.
Configuration menu - View commit details
-
Copy full SHA for 5748840 - Browse repository at this point
Copy the full SHA 5748840View commit details -
Sema: Added optional usage of
checkAccessOutOfBounds
by`elemPtrSlice`.
Configuration menu - View commit details
-
Copy full SHA for a6b7cb7 - Browse repository at this point
Copy the full SHA a6b7cb7View commit details -
Sema: Added optional usage of
checkCastToPointerFromInvalid
by`coerceCompatiblePtrs`.
Configuration menu - View commit details
-
Copy full SHA for 99dd22a - Browse repository at this point
Copy the full SHA 99dd22aView commit details -
* Added optional usage of `checkAccessNullValue`, `checkAccessOutOfBounds`, `checkAccessOutOfOrder`, and `checkMismatchedSentinel` by `analyzeSlice`. * Updated fail block initializer.
Configuration menu - View commit details
-
Copy full SHA for 05730b4 - Browse repository at this point
Copy the full SHA 05730b4View commit details
Commits on Mar 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e67ac50 - Browse repository at this point
Copy the full SHA e67ac50View commit details -
* Effectively renamed `panicImpl` to `panicImplDefault`, and replaced `panicImpl` definition of former `builtin.default_panic`. * Replaced usage of `builtin.panic` by `panicExtra` with call to `panicImpl`.
Configuration menu - View commit details
-
Copy full SHA for fe3bd05 - Browse repository at this point
Copy the full SHA fe3bd05View commit details -
* Removed sanity check (for unreachable causes). * Other minor fixes and improvements.
Configuration menu - View commit details
-
Copy full SHA for d9a4cf1 - Browse repository at this point
Copy the full SHA d9a4cf1View commit details -
Configuration menu - View commit details
-
Copy full SHA for a5e4c95 - Browse repository at this point
Copy the full SHA a5e4c95View commit details
Commits on Mar 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f029550 - Browse repository at this point
Copy the full SHA f029550View commit details -
Configuration menu - View commit details
-
Copy full SHA for 53586d2 - Browse repository at this point
Copy the full SHA 53586d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c04e3a - Browse repository at this point
Copy the full SHA 8c04e3aView commit details -
Sema: Attempted to reduce the number and frequency of use of potentially
confusing `uncasted_*_opt` references by `analyzeSlice2`.
Configuration menu - View commit details
-
Copy full SHA for 1166e34 - Browse repository at this point
Copy the full SHA 1166e34View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ab3c36 - Browse repository at this point
Copy the full SHA 2ab3c36View commit details
Commits on Apr 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f190dc1 - Browse repository at this point
Copy the full SHA f190dc1View commit details
Commits on Apr 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3293103 - Browse repository at this point
Copy the full SHA 3293103View commit details -
builtin: Removed
packed
from panic data type for`accessed_inactive_field`.
Configuration menu - View commit details
-
Copy full SHA for e704d9a - Browse repository at this point
Copy the full SHA e704d9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d995178 - Browse repository at this point
Copy the full SHA d995178View commit details
Commits on Apr 20, 2024
-
builtin: Changed error message to be adequate for a larger number of
error cases. An ideal solution would distinguish between index out-of-bounds and slice operand out-of-bounds.
Configuration menu - View commit details
-
Copy full SHA for 0152d9d - Browse repository at this point
Copy the full SHA 0152d9dView commit details
Commits on Apr 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 48697fc - Browse repository at this point
Copy the full SHA 48697fcView commit details
Commits on Apr 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5ba88af - Browse repository at this point
Copy the full SHA 5ba88afView commit details
Commits on Apr 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 17346b8 - Browse repository at this point
Copy the full SHA 17346b8View commit details
Commits on Apr 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3734c11 - Browse repository at this point
Copy the full SHA 3734c11View commit details
Commits on Apr 27, 2024
-
* Added functions to enable slicing reinterpreted compile-time memory when the element type has no runtime bits. * Reworded documentation comment for `abiSizeOfContainingDecl`.
Configuration menu - View commit details
-
Copy full SHA for 00d7c23 - Browse repository at this point
Copy the full SHA 00d7c23View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8178ed6 - Browse repository at this point
Copy the full SHA 8178ed6View commit details -
* Updated `RuntimeSafety.analyzeSlice2` to support slicing pointers-to-many for element types with zero runtime bits. * Simplified compile error message for `slice_start` when sentinel index is out of bounds.
Configuration menu - View commit details
-
Copy full SHA for d107743 - Browse repository at this point
Copy the full SHA d107743View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4426504 - Browse repository at this point
Copy the full SHA 4426504View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5dd4f39 - Browse repository at this point
Copy the full SHA 5dd4f39View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1fb30d9 - Browse repository at this point
Copy the full SHA 1fb30d9View commit details
Commits on Apr 28, 2024
-
Sema: Corrected
toUnsignedInt
togetUnsignedIntAdvanced
. This unwrapcan be null if `usize` is larger than `u64`.
Configuration menu - View commit details
-
Copy full SHA for 411dba1 - Browse repository at this point
Copy the full SHA 411dba1View commit details -
* Generally updated panic message writers to move closer to a final version. * Added sums of bytes written to panic message buffers for some code blocks. * Added comment reminding to treat indexing bounds and slicing bounds separately for clarity and consistency of error messages. * Updated panic message writers writing arbitrarily long strings to use `cpyEquTrunc`. This limits the number of bytes taken by any single component of the error message. The primary motivation for this is to prevent very large type names from consuming the entire buffer before any other panic data can be rendered. Truncated strings are indicated like 'looooooong_stri[..]', so the minimum budget for any copy is 4. Example for `panicAccessedInactiveField` with a purposefully low tag name budget of 16: "access of union field 'b_long_inact[..]' while field 'b_long_activ[..]' is active"
Configuration menu - View commit details
-
Copy full SHA for c7d4e58 - Browse repository at this point
Copy the full SHA c7d4e58View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3cdf74 - Browse repository at this point
Copy the full SHA e3cdf74View commit details -
Configuration menu - View commit details
-
Copy full SHA for bac3b9f - Browse repository at this point
Copy the full SHA bac3b9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d989c59 - Browse repository at this point
Copy the full SHA d989c59View commit details
Commits on May 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ce79ca8 - Browse repository at this point
Copy the full SHA ce79ca8View commit details -
* Added standard documentation about compiler dependency to `RuntimeSafety` as well as note on how it might be used in the future. * Renamed `panicNew_default` to `panicImpl`. * Relocated (removed) writer functions. * Relocated or deleted helper functions. debug: * Relocated (added) writer functions.
Configuration menu - View commit details
-
Copy full SHA for ee49dc2 - Browse repository at this point
Copy the full SHA ee49dc2View commit details -
Configuration menu - View commit details
-
Copy full SHA for d214cfc - Browse repository at this point
Copy the full SHA d214cfcView commit details -
* Added behavior test for slice success variants. * Removed redundant slice runtime safety test. This and other tests will be restored when feedback is given on the allowed number of slice runtime safety tests.
Configuration menu - View commit details
-
Copy full SHA for 8059085 - Browse repository at this point
Copy the full SHA 8059085View commit details -
test: Restored many runtime safety tests. This includes some slice
tests which will be redundant if the `Sema.analyzeSlice2` runtime safety tests are added. However if that addition is not approved these tests will provide basic coverage until a more concise testsuite can be generated. Between 60 and 70 of these 82 files will pass for the x86-64 backend. This difference is caused by missing features, such as vector operations and checking enumeration values and error codes.
Configuration menu - View commit details
-
Copy full SHA for fe2e299 - Browse repository at this point
Copy the full SHA fe2e299View commit details -
test: Included
slice2.zig
inbehavior.zig
. A recent releaseversion (0.13.0-dev.46+3648d7df1) of the compiler will crash when attempting `zig test test/behavior/slice2.zig`.
Configuration menu - View commit details
-
Copy full SHA for 1519f84 - Browse repository at this point
Copy the full SHA 1519f84View commit details -
test: Updated test "type pun signed and unsigned as array pointer",
so that it does not require the creation of an invalid slice. This change does not impact the test result.
Configuration menu - View commit details
-
Copy full SHA for 72c854e - Browse repository at this point
Copy the full SHA 72c854eView commit details -
test: Updated test "comptime slice-sentinel in bounds (on target sent…
…inel)" so that the type of local slice `target` includes the necessary sentinel.
Configuration menu - View commit details
-
Copy full SHA for cb99c8e - Browse repository at this point
Copy the full SHA cb99c8eView commit details -
test: Removed test using illegal combination of slice inputs. That is,
`slice_end` slicing compile-time-known undefined pointer using runtime-known end operand.
Configuration menu - View commit details
-
Copy full SHA for 45fa681 - Browse repository at this point
Copy the full SHA 45fa681View commit details -
* Updated test `foo_cvector_ConstPtrSpecialRef` to include required sentinel in type definition. * Updated various compile errors.
Configuration menu - View commit details
-
Copy full SHA for f24a0fa - Browse repository at this point
Copy the full SHA f24a0faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 812ff6c - Browse repository at this point
Copy the full SHA 812ff6cView commit details -
test: Added compile error variants of
Sema.analyzeSlice2
testsuite.This selection could be improved by adding variants for 0-bit and `comptime`-only types.
Configuration menu - View commit details
-
Copy full SHA for 8de4351 - Browse repository at this point
Copy the full SHA 8de4351View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f3555a - Browse repository at this point
Copy the full SHA 5f3555aView commit details
Commits on May 10, 2024
-
* Updated definitions of `panicNew` to account for the loss of `runtime_safety` builtin information. `builtin.PanicData` can no longer predict `void` values. This may be restored in future updates. * Changed some cases from `reached_unreachable` to `unwrapped_error`. * Changed some cases from `corrupt_switch` to `cast_to_enum_from_invalid`.
Configuration menu - View commit details
-
Copy full SHA for fdfb156 - Browse repository at this point
Copy the full SHA fdfb156View commit details -
Configuration menu - View commit details
-
Copy full SHA for d0d66f9 - Browse repository at this point
Copy the full SHA d0d66f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c459905 - Browse repository at this point
Copy the full SHA c459905View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9cc266 - Browse repository at this point
Copy the full SHA e9cc266View commit details -
Sema: Removed
air_tag_safe
from primaryanalyzeArithmetic
switch, asthis is no longer usable.
Configuration menu - View commit details
-
Copy full SHA for 5f92f62 - Browse repository at this point
Copy the full SHA 5f92f62View commit details -
Sema: Added check for backend support for error return trace. It is
possible that the current implementation only calls this function after having already established backend support, however it might not be the case that backend support for `error_return_trace` and `unwrap_error` are the same. In this case case a lot of the `unwrap_error` panic data may be reported without the `builtin.StackTrace` pointer.
Configuration menu - View commit details
-
Copy full SHA for e43d6be - Browse repository at this point
Copy the full SHA e43d6beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0eaa15c - Browse repository at this point
Copy the full SHA 0eaa15cView commit details
Commits on May 11, 2024
-
* Improved general usability of panic preparation functions by preventing usage by backends which do not support the feature. Note: The x86-64 backend actually does support all but three of the current panic causes. It does not support `checkCastToEnumFromInvalid` and `checkCastToErrorFromInvalid`, nor does it support the former `corrupt_switch` panic cause (except in one unconditional case)--but this might be unreachable for other reasons. * Updated `reinterpretLength` to allow recursively reinterpreting arrays of arrays, arrays of vectors, and vectors of arrays of the child type. * Relocated helper functions `reinterpretLength`, `reinterpretLengthOfContainingDecl`, and `abiSizeOfContainingDecl`, which may be suitable for general use. * Removed extra definition of `Sema.analyzeSlice2` from the sub-namespace. * Added experimental `addSubSafeOptimized`. This function has been tested to produce a small optimisation to arithmetic overflow checks, which are currently very expensive when generated by LLVM. The soundness of this function has not been totally verified, so it remains unused.
Configuration menu - View commit details
-
Copy full SHA for 95122fb - Browse repository at this point
Copy the full SHA 95122fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f147ed - Browse repository at this point
Copy the full SHA 9f147edView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83d9fa6 - Browse repository at this point
Copy the full SHA 83d9fa6View commit details -
Sema: Added attempt to optimise arithmetic overflow check. This has
a small effect overall, because the applicable variants are not very common (in empty main). However the effect will likely be much larger for functions in `std.crypto`, where the variant is frequently seen in inline while loops.
Configuration menu - View commit details
-
Copy full SHA for 094d970 - Browse repository at this point
Copy the full SHA 094d970View commit details -
Sema: Updated
prepareRuntimeSafety
to be less lenient regarding `pa……nic` parameter count.
Configuration menu - View commit details
-
Copy full SHA for 4c1a227 - Browse repository at this point
Copy the full SHA 4c1a227View commit details
Commits on May 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3486a21 - Browse repository at this point
Copy the full SHA 3486a21View commit details -
* Removed explicit field values from `PanicCause`. These will not be required until the `RuntimeSafety` type is used to manage the state of runtime safety features. * Swapped field order of `ErrorStackTrace`.
Configuration menu - View commit details
-
Copy full SHA for ea8f407 - Browse repository at this point
Copy the full SHA ea8f407View commit details -
builtin: Updated
PanicData
to match the compiler implementationprecisely. Note that mismatches have not been ruled out, but none are known.
Configuration menu - View commit details
-
Copy full SHA for 1c19a5c - Browse repository at this point
Copy the full SHA 1c19a5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e82d47 - Browse repository at this point
Copy the full SHA 3e82d47View commit details -
Configuration menu - View commit details
-
Copy full SHA for 942806f - Browse repository at this point
Copy the full SHA 942806fView commit details -
debug: Minor restructure to provide for rendering operands in
'checked vector arithmetic'.
Configuration menu - View commit details
-
Copy full SHA for f72f49b - Browse repository at this point
Copy the full SHA f72f49bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a90c4f9 - Browse repository at this point
Copy the full SHA a90c4f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c23e812 - Browse repository at this point
Copy the full SHA c23e812View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb367f4 - Browse repository at this point
Copy the full SHA eb367f4View commit details -
* Removed unused cache elements. * Removed more references to `runtime_safety`.
Configuration menu - View commit details
-
Copy full SHA for f13051d - Browse repository at this point
Copy the full SHA f13051dView commit details -
Sema: Made
casted_rhs_val
a parameter of `checkSimpleArithmeticOver……flowOptimised`.
Configuration menu - View commit details
-
Copy full SHA for 6e2e9f0 - Browse repository at this point
Copy the full SHA 6e2e9f0View commit details -
Configuration menu - View commit details
-
Copy full SHA for d7ea11c - Browse repository at this point
Copy the full SHA d7ea11cView commit details
Commits on May 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1072c2a - Browse repository at this point
Copy the full SHA 1072c2aView commit details -
Sema: Removed unused functions:
panicWithMsg
,panicUnwrapError
,`panicIndexOutOfBounds`, `panicInactiveUnionField`, `panicSentinelMismatch`, `safetyCheckFormatted`, and `safetyPanic`.
Configuration menu - View commit details
-
Copy full SHA for 2d3846d - Browse repository at this point
Copy the full SHA 2d3846dView commit details -
* Removed `export` from functions declared in slice success cases behaviour test. * Added skip for `stage2_riscv64` backend for the same slice behaviour test.
Configuration menu - View commit details
-
Copy full SHA for 9c6b1f4 - Browse repository at this point
Copy the full SHA 9c6b1f4View commit details
Commits on May 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c8296a5 - Browse repository at this point
Copy the full SHA c8296a5View commit details -
builtin: Removed panic causes without panic data from primary switch, as
these are unreachable due to the preceding if-expression.
Configuration menu - View commit details
-
Copy full SHA for d7aa820 - Browse repository at this point
Copy the full SHA d7aa820View commit details -
debug: Combined error message writers for `(add|sub|div|mul)_overflow…
…ed`. This is more efficient for the standard library, because all of these are likely to be compiled before reaching `main`.
Configuration menu - View commit details
-
Copy full SHA for e817541 - Browse repository at this point
Copy the full SHA e817541View commit details -
Sema: Removed experimental optimisation. It caused problems with
`riscv64` + `-fno-llvm`, `-fno-lld`.
Configuration menu - View commit details
-
Copy full SHA for 7e617d2 - Browse repository at this point
Copy the full SHA 7e617d2View commit details -
* Removed `addSafetyCheck`. * `addSafetyCheck` will not insert a trap if the target fail block has no instructions.
Configuration menu - View commit details
-
Copy full SHA for e5dffaa - Browse repository at this point
Copy the full SHA e5dffaaView commit details -
* Removed `haveRuntimeSafetyPanic`. * Added traps where required. target: Temporarily disabled `riscv64` panics. This was recently added for the old interface but I know nothing about the requirements for the new interface.
Configuration menu - View commit details
-
Copy full SHA for 0fa47ce - Browse repository at this point
Copy the full SHA 0fa47ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 29f35cc - Browse repository at this point
Copy the full SHA 29f35ccView commit details
Commits on May 17, 2024
-
nextafter: Added workaround to avoid introduction of
zig_make_big
,etc. for tests using `-ofmt=c`.
Configuration menu - View commit details
-
Copy full SHA for 7fed217 - Browse repository at this point
Copy the full SHA 7fed217View commit details
Commits on May 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d4e9d57 - Browse repository at this point
Copy the full SHA d4e9d57View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b300fb - Browse repository at this point
Copy the full SHA 3b300fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2945639 - Browse repository at this point
Copy the full SHA 2945639View commit details -
test: Added runtime panic variants for slices of various pointers to
unsigned 8-bit integers.
Configuration menu - View commit details
-
Copy full SHA for d1a246c - Browse repository at this point
Copy the full SHA d1a246cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ecc1860 - Browse repository at this point
Copy the full SHA ecc1860View commit details
Commits on May 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c51a44e - Browse repository at this point
Copy the full SHA c51a44eView commit details -
c: Updated definitions related to
panic2
.compiler_rt: Updated definitions related to `panic2`. builtin: Removed panic causes `inc_overflowed` and `dec_overflowed`.
Configuration menu - View commit details
-
Copy full SHA for 2c4bca6 - Browse repository at this point
Copy the full SHA 2c4bca6View commit details -
* Removed notes on backend logic and renaming. * `panic` should probably not be removed for some time, as doing so will break every compiler not built using this branch.
Configuration menu - View commit details
-
Copy full SHA for 7df0078 - Browse repository at this point
Copy the full SHA 7df0078View commit details -
Configuration menu - View commit details
-
Copy full SHA for d796bc5 - Browse repository at this point
Copy the full SHA d796bc5View commit details -
* Updated `failWithOwnedErrorMsg` to call `compilerPanicSimple`. * Simplified compile error messages for slice start out-of-bounds.
Configuration menu - View commit details
-
Copy full SHA for 80b95f7 - Browse repository at this point
Copy the full SHA 80b95f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2aec81 - Browse repository at this point
Copy the full SHA b2aec81View commit details -
Sema: Restored usage of safe arithmetic instructions when the panic
interface is simple.
Configuration menu - View commit details
-
Copy full SHA for 8b3bd60 - Browse repository at this point
Copy the full SHA 8b3bd60View commit details -
Sema: Removed
inc_overflowed
anddec_overflowed
from `RuntimeSafe……ty.PanicCause`.
Configuration menu - View commit details
-
Copy full SHA for c378d7f - Browse repository at this point
Copy the full SHA c378d7fView commit details -
Sema: Many minor changes intended to enable reuse of generic
instantiations, by means of a simple constant-time cache. This saves approximately 3000 calls to `instantiateGenericCall` for empty main, and allows usage of 'simple panic' by the LLVM codegen.
Configuration menu - View commit details
-
Copy full SHA for 7c28d24 - Browse repository at this point
Copy the full SHA 7c28d24View commit details -
* Rewrote `buildSimplePanic` to use new interface. * Updated `airSafeArithmetic` to call `buildSimplePanic`.
Configuration menu - View commit details
-
Copy full SHA for cbbb9d3 - Browse repository at this point
Copy the full SHA cbbb9d3View commit details -
* Removed unused function `prepareSimplePanic`. * Removed unused `compilerPanic`. * Renamed `compilerPanicNew` to `compilerPanic`. * Added `compilerPanicSimple` to use the simple interface. * Made `compilerPanicSimple` the default interface for the compiler. I have no opinion on whether this last change should remain, it simply improves compiler rebuild times by 30 seconds for `Debug`.
Configuration menu - View commit details
-
Copy full SHA for 2f06f82 - Browse repository at this point
Copy the full SHA 2f06f82View commit details -
* Updated definition of `panic2` by `panic_has_source_location`. * Increased number of slice compile errors by ~30%. Decreased source code size by ~30%. * Updated definition of `panic2` by godbold test code.
Configuration menu - View commit details
-
Copy full SHA for 458cafc - Browse repository at this point
Copy the full SHA 458cafcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 278ffff - Browse repository at this point
Copy the full SHA 278ffffView commit details
Commits on May 26, 2024
-
Sema: Implemented slice casts, closes ziglang#20057.
* Split `zirDivTrunc` into `zir*` and `analysis*` parts, so that the analysis part could be reused by `analyzeSlice2` when computing the new slice length. * Added explanation for the potential (currently unused) optimisation to overflow checks.
Configuration menu - View commit details
-
Copy full SHA for a7f8cf7 - Browse repository at this point
Copy the full SHA a7f8cf7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e848ae - Browse repository at this point
Copy the full SHA 3e848aeView commit details -
crash_report: Restored old
panic
. This settles the question of whetherthe old interface can be removed all at once.
Configuration menu - View commit details
-
Copy full SHA for e5af5aa - Browse repository at this point
Copy the full SHA e5af5aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 53b5879 - Browse repository at this point
Copy the full SHA 53b5879View commit details -
builtin: Made
panicImpl
andpanicImplData
public, allowing the userto simply declare `pub const panic = std.builtin.panicImpl;` to define their preference.
Configuration menu - View commit details
-
Copy full SHA for 83d6c7e - Browse repository at this point
Copy the full SHA 83d6c7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b568a4 - Browse repository at this point
Copy the full SHA 2b568a4View commit details -
Compilation: Handle error from
deleteFile
so that the desiredoutcome (the file not existing) does not throw an error. main: As above.
Configuration menu - View commit details
-
Copy full SHA for 6949b3a - Browse repository at this point
Copy the full SHA 6949b3aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61e4bf8 - Browse repository at this point
Copy the full SHA 61e4bf8View commit details
Commits on May 27, 2024
-
builtin: Added to logic to determine the default panic interface mode.
Data for `Debug`, otherwise simple.
Configuration menu - View commit details
-
Copy full SHA for 1ae4a73 - Browse repository at this point
Copy the full SHA 1ae4a73View commit details -
Configuration menu - View commit details
-
Copy full SHA for f3451dd - Browse repository at this point
Copy the full SHA f3451ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for d57f82c - Browse repository at this point
Copy the full SHA d57f82cView commit details