From 746eaec99eb8da6d45583d3f5975a3aa8d06170b Mon Sep 17 00:00:00 2001 From: Andrew C Aitchison Date: Sat, 13 Jun 2026 15:39:20 +0100 Subject: [PATCH 1/2] rebasing 18d5e8ce6 strerror is now thread safe --- addons/threadsafety.py | 2 -- test/cli/other_test.py | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/threadsafety.py b/addons/threadsafety.py index 390a245d4e1..25b2c16abe3 100755 --- a/addons/threadsafety.py +++ b/addons/threadsafety.py @@ -91,7 +91,6 @@ 'race:stdin', 'race:stdout', 'race:streams', - 'race:strerror', 'race:strsignal', 'race:strtok', 'race:tmbuf', @@ -261,7 +260,6 @@ 'siginterrupt', 'sleep', 'srand48', - 'strerror', 'strsignal', 'strtok', 'tmpnam', diff --git a/test/cli/other_test.py b/test/cli/other_test.py index c86d8cd5a81..19713de3ca2 100644 --- a/test/cli/other_test.py +++ b/test/cli/other_test.py @@ -482,9 +482,9 @@ def test_addon_threadsafety(tmpdir): test_file = os.path.join(tmpdir, 'test.cpp') with open(test_file, 'wt') as f: f.write(""" -extern const char* f() +extern void f() { - return strerror(1); + elf_fill(1); } """) @@ -496,7 +496,7 @@ def test_addon_threadsafety(tmpdir): assert lines == [ 'Checking {} ...'.format(test_file) ] - assert stderr == '{}:4:12: warning: strerror is MT-unsafe [threadsafety-unsafe-call]\n'.format(test_file) + assert stderr == '{}:4:5: warning: elf_fill is MT-unsafe [threadsafety-unsafe-call]\n'.format(test_file) def test_addon_naming(tmpdir): @@ -4927,6 +4927,7 @@ def test_ipc_inline_suppressions(tmp_path): assert stdout_lines == stdout_exp assert stderr.splitlines() == [] + test_redundant_file_reads_params = [ ([], 3), (['--suppress=zerodiv'], 1), From 3c213e008d1e2eeb7cd7d874c214279c50c41adc Mon Sep 17 00:00:00 2001 From: Andrew C Aitchison Date: Sat, 10 Oct 2026 15:19:45 +0100 Subject: [PATCH 2/2] whitespace to match upstream --- test/cli/other_test.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/cli/other_test.py b/test/cli/other_test.py index 19713de3ca2..34c61f828d4 100644 --- a/test/cli/other_test.py +++ b/test/cli/other_test.py @@ -4927,7 +4927,6 @@ def test_ipc_inline_suppressions(tmp_path): assert stdout_lines == stdout_exp assert stderr.splitlines() == [] - test_redundant_file_reads_params = [ ([], 3), (['--suppress=zerodiv'], 1),