~ chicken-core (master) 5d03418a612b6f3f8c4c540888f00fd07e1f6c93
commit 5d03418a612b6f3f8c4c540888f00fd07e1f6c93
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Mon Mar 24 21:18:47 2025 +0100
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Mon Mar 24 21:18:47 2025 +0100
Save C primitive for bytevector-length did not check for non-atomic datum
(reported by wasamasa)
diff --git a/runtime.c b/runtime.c
index 0efc4f13..e8d747e1 100644
--- a/runtime.c
+++ b/runtime.c
@@ -5953,7 +5953,7 @@ C_regparm C_word C_i_vector_length(C_word v)
C_regparm C_word C_i_bytevector_length(C_word v)
{
- if(!C_truep(C_bytevectorp(v)))
+ if(C_immediatep(v) || !C_truep(C_bytevectorp(v)))
barf(C_BAD_ARGUMENT_TYPE_ERROR, "bytevector-length", v);
return C_fix(C_header_size(v));
Trap