From 12fd1d7637c2fe5a4a6361aeb0f23997880cf1e2 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 8 Jan 2020 00:49:00 +0000 Subject: tests: broken glob test cases crash under musl. Among several issues, the main one is that these test cases use the str-d FFI type for strings. This type means that TXR will take ownership of the memory; it creates the Lisp strings for the Lisp array, and then assuming that it has owership of the C strings, it will free them. On musl, this causes an instant crash, probably because the strings might not be individually coming from malloc. The only documented interface for freing glob resources is globfree; programs cannot assume that the strings can be freed. * tests/017/glob-carray.expected: Updated. * tests/017/glob-carray.tl (glob-t): Add missing flags member of type int. Change the array element string type from str-d to str. * tests/017/glob-zarray.tl: Likewise, and also add a comment to explain why we are not calling globfree in this test case. --- tests/017/glob-carray.expected | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/017/glob-carray.expected') diff --git a/tests/017/glob-carray.expected b/tests/017/glob-carray.expected index cf4b8a5e..996151ee 100644 --- a/tests/017/glob-carray.expected +++ b/tests/017/glob-carray.expected @@ -1,4 +1,4 @@ 0 -#S(glob-t pathc 5 pathv #> reserve 0) +#S(glob-t pathc 5 pathv #> reserve 0) #("tests/001/query-1.txr" "tests/001/query-2.txr" "tests/001/query-3.txr" "tests/001/query-4.txr" "tests/001/query-5.txr") -- cgit v1.2.3