bug#26503: Local variables reclaimed early vs. finalizers

2017-04-19 Thread Andy Wingo
On Wed 19 Apr 2017 11:50, l...@gnu.org (Ludovic Courtès) writes: > I need to chew a bit more on this, but the conclusion is probably that > my expectations were incorrect, indeed. :-) OK I close this bug in the meantime then :) Feel free to reopen if there is a thing to do! Andy

bug#26503: Local variables reclaimed early vs. finalizers

2017-04-19 Thread Ludovic Courtès
Andy Wingo skribis: > l...@gnu.org (Ludovic Courtès) writes: > >> Consider this code: >> >> (use-modules (system foreign)) >> >> (define %abort >> (dynamic-func "abort" (dynamic-link))) >> >> (let ((ptr (make-pointer 123 %abort))) >> (display "hello\n") >> (gc)) >> >> Guile is free to colle

bug#26503: Local variables reclaimed early vs. finalizers

2017-04-19 Thread Andy Wingo
l...@gnu.org (Ludovic Courtès) writes: > Consider this code: > > (use-modules (system foreign)) > > (define %abort > (dynamic-func "abort" (dynamic-link))) > > (let ((ptr (make-pointer 123 %abort))) > (display "hello\n") > (gc)) > > Guile is free to collect ‘ptr’ when ‘gc’ is called since it

bug#26503: Local variables reclaimed early vs. finalizers

2017-04-14 Thread Ludovic Courtès
Hello! Consider this code: --8<---cut here---start->8--- (use-modules (system foreign)) (define %table (make-weak-value-hash-table)) (define %abort (dynamic-func "abort" (dynamic-link))) (let ((ptr (make-pointer 123 %abort))) (display "hello\n") (gc)