wolfSSL / wolfssl

The wolfSSL library is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud. wolfSSL supports up to TLS 1.3 and DTLS 1.3!
https://www.wolfssl.com
GNU General Public License v2.0
2.36k stars 834 forks source link

fix thread start callback prototype for Open Watcom toolchain #8175

Open jmalak opened 1 week ago

jmalak commented 1 week ago

Description

fix callback prototype for Windows and pthread, the Windows version does not return any value and the pthread version is a standard thread callback function (THREAD_CB) with a return value

fix callback function calling convention for Open Watcom toolchain Open Watcom has an implementation of _beginthread for other operating systems as well, and uses a default calling convention that is not cdecl

wolfSSL-Bot commented 1 week ago

Can one of the admins verify this patch?

dgarske commented 1 week ago

Hi @jmalak ,

Thank you for the PR. I've assigned this over to @kareem-wolfssl who is handling your contributor agreement.

Thanks, David Garske, wolfSSL

kareem-wolfssl commented 1 week ago

ok to test

bandi13 commented 1 week ago

retest this please

jmalak commented 1 week ago

@kareem-wolfssl I am sorry, PRB-master-job is failing but I have no access to Jenkins to get some details about issue. Please could you help me somehow.

JacobBarthelmeh commented 2 days ago

retest this please Jenkins

JacobBarthelmeh commented 2 days ago

Results of Jenkins tests @jmalak :

[check-source-text] [2 of 7] [wolfssl]

    autogen.sh wolfssl...   real 0m6.931s  user 0m5.349s  sys 0m0.221s

    configure...   real 0m8.673s  user 0m6.986s  sys 0m1.637s

macros that take args but have an unannotated null definition:

wolfssl/wolfcrypt/types.h:1579:                #define RETURN_FROM_THREAD_NOJOIN(x)

unrecognized macros used:

HAVE_CRL_UPDATE_CB

add well-formed but unknown macros to /tmp/workspace/PRB-multi-test-script/wolfssl/.wolfssl_known_macro_extras.

There was also a udp_proxy failure which seems odd given these code changes. Would work on the nit from the CI test and when updating with the change see if the udp_proxy test was just being flaky.

bandi13 commented 2 days ago

You're just failing the 80 character limit on a couple lines.

wolfcrypt/src/random.c:916 static THREAD_RETURN_NOJOIN WOLFSSL_THREAD_NO_JOIN Entropy_IncCounter(void* args)
wolfssl/wolfcrypt/types.h:1574                 #define RETURN_FROM_THREAD_NOJOIN(x) WOLFSSL_RETURN_FROM_THREAD(x)