about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-10-31 13:23:06 +0100
committerFlorian Weimer <fweimer@redhat.com>2019-11-16 15:57:01 +0100
commit2a764c6ee848dfe92cb2921ed3b14085f15d9e79 (patch)
tree12d283aab07a5cb66474aff7a388dd585a2d2989 /sysdeps/generic
parent84df7a4637be8ecb545df3501cc724f3a4d53c46 (diff)
downloadglibc-2a764c6ee848dfe92cb2921ed3b14085f15d9e79.tar.gz
glibc-2a764c6ee848dfe92cb2921ed3b14085f15d9e79.tar.xz
glibc-2a764c6ee848dfe92cb2921ed3b14085f15d9e79.zip
Enhance _dl_catch_exception to allow disabling exception handling
In some cases, it is necessary to introduce noexcept regions
where raised dynamic loader exceptions (e.g., from lazy binding)
are fatal, despite being nested in a code region with an active
exception handler.  This change enhances _dl_catch_exception with
to provide such a capability.  The existing function is reused,
so that it is not necessary to introduce yet another function with
a similar purpose.

Change-Id: Iec1bf642ff95a349fdde8040e9baf851ac7b8904
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/ldsodefs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 4d67c05e72..891049dd1a 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -861,7 +861,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)