From 439716df61ee4a2ce17cf278ff9d86cf056926f9 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Jan 06 2021 22:38:58 +0000 Subject: Apply patch glibc-rh1410154-3.patch patch_name: glibc-rh1410154-3.patch present_in_specfile: true location_in_specfile: 246 --- diff --git a/elf/dl-error-skeleton.c b/elf/dl-error-skeleton.c index d5f418a..9cb002c 100644 --- a/elf/dl-error-skeleton.c +++ b/elf/dl-error-skeleton.c @@ -173,6 +173,18 @@ int _dl_catch_exception (struct dl_exception *exception, void (*operate) (void *), void *args) { + /* If exception is NULL, temporarily disable exception handling. + Exceptions during operate (args) are fatal. */ + if (exception == NULL) + { + struct catch *const old = catch_hook; + catch_hook = NULL; + operate (args); + /* If we get here, the operation was successful. */ + catch_hook = old; + return 0; + } + /* We need not handle `receiver' since setting a `catch' is handled before it. */ diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 95dc875..cc24840 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -852,7 +852,9 @@ libc_hidden_proto (_dl_catch_error) /* Call OPERATE (ARGS). If no error occurs, set *EXCEPTION to zero. Otherwise, store a copy of the raised exception in *EXCEPTION, - which has to be freed by _dl_exception_free. */ + which has to be freed by _dl_exception_free. As a special case, if + EXCEPTION is null, call OPERATE (ARGS) with exception handling + disabled (so that exceptions are fatal). */ int _dl_catch_exception (struct dl_exception *exception, void (*operate) (void *), void *args); libc_hidden_proto (_dl_catch_exception)