Summary
GC in callbacks will invalidate references to Scheme data used in "crunch" code
Metadata
- Id: 5646a5f2854f31fee27b5a3936702dac0e0b1de6
- Trac id: 243
- Type: defect
- Reporter: felix
- Owner:
- Cc:
- Status: closed
- Component: extensions
- Estimated difficulty:
- Resolution: wontfix
- Priority: minor
- Milestone:
- Version:
- Changetime: 2010-05-22 14:24:06 UTC
- Created: 2010-05-21 23:52:02 UTC
- Keywords: crunch
Description
When code compiled with `crunch` manipulates number-vectors or strings allocated in Scheme, then a callback is likely to trigger a GC, which will move those data-structures, rendering existing references to them on the crunch side invalid.
It may be possible to use a special vector/buffer type for data-objects passed from Scheme to crunch.
Changes and comments
[2010-05-22 14:24:06 UTC] felix changed status from new to closed
[2010-05-22 14:24:06 UTC] felix set resolution to wontfix
[2010-05-22 14:24:06 UTC] felix wrote:
Replying to felix: > When code compiled with `crunch` manipulates number-vectors or strings allocated in Scheme, then a callback is likely to trigger a GC, which will move those data-structures, rendering existing references to them on the crunch side invalid.
This also applies to normal foreign code that uses callbacks, so this is not a problem with `crunch`, but with the question of how to handle such data in general.