Summary

SRFI-69 broken under debug build

Metadata

Description

Reported by Daniel Colascione to chicken-users:

 The following asserts with DEBUGBUILD=1, 6.0.0
 
 (import srfi-69)
 (eq?-hash (lambda (x) x))

 [panic] Low-level type assertion (C_truep(C_bytevectorp(C_VAL1(str)))) failed

Changes and comments

[2026-09-13 21:08:30 UTC] felix wrote:

The assertion failure is caused by a failed access to the data of a lambda-info object, which is technically a bytevector, but for which C_bytevectorp fails. I suggest adding a special case in the recursive hash procedure that dispatches on object types (or leave out the lambda-info slot when hashing procedures, altogether).