summaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authorandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-06 15:47:41 +0000
committerandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-06 15:47:41 +0000
commit61641cc01565617207f878ec22df4aa7ee965d3e (patch)
treeed26b47e0a373a78dddf380b9d92e83c360f04dd /libffi
parent7a7557da8d8d021834bf12c39d35bf837e6be534 (diff)
downloadgcc-61641cc01565617207f878ec22df4aa7ee965d3e.tar.gz
2003-11-06 Andreas Tobler <a.tobler@schweiz.ch>
* src/prep_cif.c (ffi_prep_cif): Move the validity check after the initialization. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73309 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog7
-rw-r--r--libffi/src/prep_cif.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 00ee87c6fdf..1a472aa7954 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,6 +1,11 @@
+2003-11-06 Andreas Tobler <a.tobler@schweiz.ch>
+
+ * src/prep_cif.c (ffi_prep_cif): Move the validity check after
+ the initialization.
+
2003-10-23 Andreas Tobler <a.tobler@schweiz.ch>
- * src/java_raw_api.c (ffi_java_ptrarray_to_raw): Replace
+ * src/java_raw_api.c (ffi_java_ptrarray_to_raw): Replace
FFI_ASSERT(FALSE) with FFI_ASSERT(0).
2003-10-22 David Daney <ddaney@avtrex.com>
diff --git a/libffi/src/prep_cif.c b/libffi/src/prep_cif.c
index f43ccfc4558..3ee5eadcd7f 100644
--- a/libffi/src/prep_cif.c
+++ b/libffi/src/prep_cif.c
@@ -125,13 +125,15 @@ ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif,
for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++)
{
- /* Perform a sanity check on the argument type */
- FFI_ASSERT_VALID_TYPE(*ptr);
/* Initialize any uninitialized aggregate type definitions */
if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK))
return FFI_BAD_TYPEDEF;
+ /* Perform a sanity check on the argument type, do this
+ check after the initialization. */
+ FFI_ASSERT_VALID_TYPE(*ptr);
+
#if !defined __x86_64__ && !defined S390
#ifdef SPARC
if (((*ptr)->type == FFI_TYPE_STRUCT