[openssl] master update

Matt Caswell matt at openssl.org
Wed Jun 16 14:44:01 UTC 2021


The branch master has been updated
       via  c3932c34cde5a152baeecd24d2395b4ad205a6d8 (commit)
      from  218e9969fd90ded078a1a558c110cd14e2272a35 (commit)


- Log -----------------------------------------------------------------
commit c3932c34cde5a152baeecd24d2395b4ad205a6d8
Author: Rich Salz <rsalz at akamai.com>
Date:   Thu Jun 10 16:06:10 2021 -0400

    Always wait for both threads to finish
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15708)

-----------------------------------------------------------------------

Summary of changes:
 test/threadstest.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/test/threadstest.c b/test/threadstest.c
index cb9817aa28..ce31738189 100644
--- a/test/threadstest.c
+++ b/test/threadstest.c
@@ -441,12 +441,16 @@ static int test_multi(int idx)
 
     worker();
 
-    if (!TEST_true(wait_for_thread(thread1))
-            || !TEST_true(wait_for_thread(thread2))
-            || !TEST_true(multi_success))
-        goto err;
-
     testresult = 1;
+    /*
+     * Don't combine these into one if statement; must wait for both threads.
+     */
+    if (!TEST_true(wait_for_thread(thread1)))
+        testresult = 0;
+    if (!TEST_true(wait_for_thread(thread2)))
+        testresult = 0;
+    if (!TEST_true(multi_success))
+        testresult = 0;
 
  err:
     EVP_MD_free(sha256);


More information about the openssl-commits mailing list