core/crypto: Use panic_contextless instead of intrinsics.trap

This commit is contained in:
Yawning Angel
2025-03-23 19:14:33 +09:00
parent 4c28f6d170
commit e4e76f27f6
13 changed files with 21 additions and 33 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ square_f128 :: #force_inline proc "contextless" (kw: x86.__m128i) -> (x86.__m128
@(enable_target_feature = "sse2,ssse3,pclmul")
ghash :: proc "contextless" (dst, key, data: []byte) #no_bounds_check {
if len(dst) != _aes.GHASH_BLOCK_SIZE || len(key) != _aes.GHASH_BLOCK_SIZE {
intrinsics.trap()
panic_contextless("aes/ghash: invalid dst or key size")
}
// Note: BearSSL opts to copy the remainder into a zero-filled