Skip to content

Commit

Permalink
Don't set cancel state/type
Browse files Browse the repository at this point in the history
pthread_cancel() is never called by OpenSSL. Therefore this is no point in
setting the cancel state/type. The functions to set the cancel state/type
are not supported on Android and result in compilation failures. Therefore
we remove these calls completely.

Fixes #19559

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #19779)
  • Loading branch information
mattcaswell authored and t8m committed Dec 1, 2022
1 parent 6ea44d0 commit 14c593e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions crypto/thread/arch/thread_posix.c
Expand Up @@ -22,9 +22,6 @@ static void *thread_start_thunk(void *vthread)

thread = (CRYPTO_THREAD *)vthread;

pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);

ret = thread->routine(thread->data);
ossl_crypto_mutex_lock(thread->statelock);
CRYPTO_THREAD_SET_STATE(thread, CRYPTO_THREAD_FINISHED);
Expand Down

0 comments on commit 14c593e

Please sign in to comment.