On Thu, Dec 11, 2014 at 11:31:06AM +0100, Dominik Vogt wrote: > Just to make this clear: It's not something that *might* happen. > It *does* happen on s390[x] which does not use libffi but the hand > written code in makefunc_s390.S and makefuncgo_s390[x].go. > > The same may not happen when calling functions through libffi > (which may be dynamically linked) because ffi_call_go() is passed > the closure pointer as an argument and not in the static chain > register.
Update: If I disable the custom s390x code and switch to the implementation just using libffi for reflection calls, the same crash occurs with the testing/quick libgo test case. The called function sees a bogus value written by the synamic linker as the closure pointer, for example with this line in the test code: CheckEqual(fComplex64, fComplex64, nil) Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany