x86_64 linux - corrupted records passed to C functions
Original Reporter info from Mantis: Giulio
-
Reporter name: Giulio Bernardi
Original Reporter info from Mantis: Giulio
- Reporter name: Giulio Bernardi
Description:
This bug could be related to http://www.freepascal.org/mantis/view.php?id=7453
Records aren't passed as they should to C functions on x86_64 linux (on i386 it's ok).
With fpc 2.0.4, a pointer to the record is passed (as said in bug 7453).
With fpc 2.1.1, something else it's passed, but it's still wrong data.
The attached files reproduce the bug: the program shows addresses and values of record and record members, in pascal program and inside the c function.
Additional information:
To compile the c library:
gcc -o libtestc.so -shared -fPIC -Xlinker "-soname=libtestc.so" testc.c
Mantis conversion info:
- Mantis ID: 7613
- Version: 2.2.0
- Fixed in version: 2.2.0
- Fixed in revision: 4951 (#5eef73c1)