This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Invalid libffi testcase?


Hello Andreas,

The testcase libffi.call/pyobj-tc.c fails on SPARC64 at runtime because the 
program attemps to store a word to a non word-aligned address.  More 
specifically, it dies when storing the result value of

	ffi_call(&cif, FFI_FN(doit), &result, values);

to 'result', which is defined by

	int   result;


Now the README file contains this paragraph:

	RVALUE is a pointer to a chunk of memory that is to hold the
		result of the function call. Currently, it must be
		at least one word in size (except for the n32 version
		under Irix 6.x, which must be a pointer to an 8 byte 
		aligned value (a long long). It must also be at least 
		word aligned (depending on the return type, and the
		system's alignment requirements). If RTYPE is 
		&ffi_type_void, this is ignored. If RVALUE is NULL, 
		the return value is discarded.

Clearly, on LP64 platforms, the testcase doesn't fulfil the requirements 
listed in the "manual".

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]