From dce39cf24b2d02b0b755be0d710b4fab0318774f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 8 Oct 2019 08:30:05 -0600 Subject: [PATCH] add note to a broken test The test doesn't go wrong so often that its crucial to fix now, but it should be fixd in the near future. --- pkgs/racket-test-core/tests/racket/foreign-test.rktl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/racket-test-core/tests/racket/foreign-test.rktl b/pkgs/racket-test-core/tests/racket/foreign-test.rktl index 9a00b78a4d..793318d372 100644 --- a/pkgs/racket-test-core/tests/racket/foreign-test.rktl +++ b/pkgs/racket-test-core/tests/racket/foreign-test.rktl @@ -278,6 +278,10 @@ ((ffi 'hoho (_fun _int (_fun _int -> (_fun _int -> _int)) -> _int)) 3 (lambda (x) (lambda (y) (+ y (* x x)))))) ;; --- + ;; FIXME: this test is broken, because the array allocated by `(_list io _int len)` + ;; has no reason to stay in place; a GC during the callback may move it. + ;; The solution is probably to extend `_list` so that an allocation mode like + ;; 'atomic-interior can be supplied. (let ([qsort (get-ffi-obj 'qsort #f (_fun (l : (_list io _int len)) (len : _int = (length l))