Bus error interfacing with C function returning large struct
Jacob Carlborg
doob at me.com
Tue Apr 16 12:29:41 PDT 2013
On 2013-04-16 21:26, Jacob Carlborg wrote:
> The following code will result in a bus error on Mac OS X 10.8.2 using
> DMD 2.062 compiled for 32bit (segfault on 64bit). A couple of notes:
>
> * This code runs fine on Mac OS X 10.6.3
> * It seems the struct has to be over 64 bits in size
> * "foo" need to take an argument
If I a store the return value of "foo" in a temporary variable in "bar"
the bus error goes away.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list