Opened 9 years ago

Closed 9 years ago

#243 closed defect (wontfix)

GC in callbacks will invalidate references to Scheme data used in "crunch" code

Reported by: felix winkelmann Owned by:
Priority: minor Milestone:
Component: extensions Version:
Keywords: crunch Cc:
Estimated difficulty:

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.

Change History (1)

comment:1 in reply to:  description Changed 9 years ago by felix winkelmann

Resolution: wontfix
Status: newclosed

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.

Note: See TracTickets for help on using tickets.