fontconfig/test
Ben Wagner 6e414d61c7 Extend test thread args lifetime
The argument passed to each thread in test-pthread.c indicates a thread
number to report when finished. This value is read out by the thread
into a local variable early in the thread's execution. Currently, the
address passed as this argument is the address of a loop local. However,
it is possible that the created thread will not be scheduled to run or
will not read the argument before the thread creation loop finishes and
the local is destroyed. This can lead to odd behavior, usually observed
as multiple threads reporting the same thread_num.

Fix this issue by storing the thread arguments in a parallel array to
the array of threads. This ensures that the thread arguments are in
scope as long as the threads themselves.

Discovered with tests/test-pthread with AddressSanitizer enabled.
2021-09-06 04:06:16 +00:00
..
4x6.pcf Add simple tests 2003-03-01 05:55:17 +00:00
8x16.pcf Add simple tests 2003-03-01 05:55:17 +00:00
Makefile.am Do not set different score to non-string values 2021-07-08 14:47:36 +09:00
fonts.conf.in Update testcase 2019-04-03 12:02:09 +00:00
meson.build Check qual and compare for family tests 2020-12-17 04:51:20 +00:00
out.expected-long-family-names Add the check of PCF_CONFIG_OPTION_LONG_FAMILY_NAMES back 2017-11-20 17:29:39 +05:30
out.expected-no-long-family-names Add the check of PCF_CONFIG_OPTION_LONG_FAMILY_NAMES back 2017-11-20 17:29:39 +05:30
run-test-conf.sh Do not set different score to non-string values 2021-07-08 14:47:36 +09:00
run-test-map.sh Replace UUID file mechanism with per-directory 'map' attribute [v2] 2019-04-03 12:02:09 +00:00
run-test.sh Fix run-test.sh to work with BSD mktemp 2021-07-14 04:34:15 +00:00
test-45-generic.json Fix stack use after scope in FcConfigCompareValue 2021-02-16 11:30:32 -05:00
test-60-generic.json Add a test case for FcFontList 2018-11-27 09:39:15 +00:00
test-90-synthetic.json Add a test case for 90-synthetic.conf 2018-05-11 22:15:39 +09:00
test-bz89617.c Fix a couple of minor memory leaks 2016-05-30 10:30:10 +09:00
test-bz96676.c Bug 96676 - Check range of FcWeightFromOpenType argument 2016-07-08 14:18:35 +09:00
test-bz106618.c Add a test case for bz#106618 2018-05-25 15:24:44 +09:00
test-bz106632.c Fix leaks in fcxml.c, fc-match.c, and tests. 2020-12-14 10:54:11 +00:00
test-bz131804.c Fix compiler warnings 2018-01-04 20:37:26 +09:00
test-bz1744377.c Fix gcc warnings with -Wpointer-sign 2019-11-06 20:28:58 +09:00
test-conf.c Do not set different score to non-string values 2021-07-08 14:47:36 +09:00
test-crbug1004254.c Fix gcc warnings with -Wpointer-sign 2019-11-06 20:28:58 +09:00
test-d1f48f11.c fccompat: fix build on Windows without unistd.h 2020-07-07 03:48:34 +00:00
test-family-matching.c Clean up test-family-matching test. 2021-01-07 07:03:42 +00:00
test-issue-286.json Do not set different score to non-string values 2021-07-08 14:47:36 +09:00
test-issue107.c fccompat: fix build on Windows without unistd.h 2020-07-07 03:48:34 +00:00
test-issue110.c fccompat: fix build on Windows without unistd.h 2020-07-07 03:48:34 +00:00
test-issue180.c Fix leaks in fcxml.c, fc-match.c, and tests. 2020-12-14 10:54:11 +00:00
test-migration.c fccompat: fix build on Windows without unistd.h 2020-07-07 03:48:34 +00:00
test-name-parse.c Minor: fix warnings 2018-03-15 07:51:06 -07:00
test-pthread.c Extend test thread args lifetime 2021-09-06 04:06:16 +00:00
test-style-match.json Fix score evaluation for multiple values in properties 2021-06-28 08:51:58 +00:00
wrapper-script.sh Fix make check on cross-compiled env 2019-03-22 16:51:38 +09:00