errorProcExt2 failure
Posted: Sat Nov 19, 2011 10:12 am
Hi,
in my FFI code, I need to sure that ffi_prep_cif went ok, so I added this:
For debugging purposes I changed status != FFI_OK to status == FFI_OK, to provoke an error.
If I now try this newLisp snippet:
the program crashes and calls the debugger.
Last message is (after adding additional messages and error numbers):
ERR: ffi preparation failed in function fcall : "printf"
As said, the newLisp.exe crashes.
It doesn't matter, at which point I call errorProcExt2, even right after entering the function.
in my FFI code, I need to sure that ffi_prep_cif went ok, so I added this:
Code: Select all
status = ffi_prep_cif(&cif,FFI_DEFAULT_ABI,2,&ffi_type_uint,argt);
if(status != FFI_OK)
{
return(errorProcExt2(ERR_FFI_PREP_FAILED, stuffString(ffi->name)));
}
else
{
ffi_call(&cif,ffi->func,&result,aval);
}
If I now try this newLisp snippet:
Code: Select all
(import "msvcrt" "printf" "cdecl")
(fcall printf a b c)
(exit 0)
Last message is (after adding additional messages and error numbers):
ERR: ffi preparation failed in function fcall : "printf"
As said, the newLisp.exe crashes.
It doesn't matter, at which point I call errorProcExt2, even right after entering the function.