[OFFLOAD] Update ffi_cif structure to match libffi (#128756)
The ffi_cif structure defined in the wrapper header is smaller than the actual structure in libffi which results in other structures being overwritten when libffi is called, and finally in a segfault. The patch updates the structure to the correct layout as specified in ffi.h
This commit is contained in:
parent
6018930ef1
commit
b8a66f50b4
@ -53,6 +53,16 @@ typedef enum ffi_abi {
|
||||
#else
|
||||
#error "Unknown ABI"
|
||||
#endif
|
||||
} ffi_abi;
|
||||
|
||||
typedef struct {
|
||||
ffi_abi abi;
|
||||
unsigned nargs;
|
||||
ffi_type **arg_types;
|
||||
ffi_type *rtype;
|
||||
unsigned bytes;
|
||||
unsigned flags;
|
||||
long long extra_fields; // Longest extra field defined in the FFI sources
|
||||
} ffi_cif;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user