Le mercredi 19 juillet 2023 à 21:57 +0200, Jean Abou Samra a écrit :
> (In recent Guile versions, it can even lead to true "nasal demons" undefined
> behavior — when you enable byte-compilation and optimizations, (set-car! '(1
> . 2) 3) outright segfaults. The time I looked at the bug, I couldn't
> understand where it was coming from.)
Lol, now I understand.
`module/language/cps/lower-primcalls.scm`:
```
;; precondition: pair is mutable pair
(define-primcall-lowerer (set-car! cps k src #f (pair val))
(with-cps cps
(build-term
($continue k src
($primcall 'scm-set!/immediate '(pair . 0) (pair val))))))
```
One of these lovely “optimizations” that the Guile developers are so fond of.
signature.asc
Description: This is a digitally signed message part
