4 ms·
I don't think Go has ever specified that a specific calling convention must be used, and it doesn't expose it very easily to the end user. I would argue that if
by vore 5y ago
I don't think Go has ever specified that a specific calling convention must be used, and it doesn't expose it very easily to the end user. I would argue that if you are writing code that depends on assuming the calling convention when it is explicitly not specified, that is a faulty assumption on you.
https://go.googlesource.com/go/+/refs/heads/dev.regabi/src/cmd/compile/internal-abi.md https://go.googlesource.com/go/+/refs/heads/dev.regabi/src/c...
This ABI is unstable and will change between Go versions.
- rightbyte 5y agoNow you are blaming the victim. Surely there is alot of ffi that will break.
- p_l 5y agoFFI already goes through calling convention translation, since Go and C runtime aren't that compatible, even more so outside of Go's native environment (Plan9)
- benhoyt 5y agoAre you sure? This would only affect C code calling Go functions, right? Apart from that being very rare (the other way around is more common using CGo), from the register proposal it looks like they've discussed and had ways to address the CGo issue. I haven't tried this though.
- rightbyte 5y agoI am not too sure really. Trying to understand it I realized I know very little about Go internals.