runtime: skip zero-sized fields in structs when converting to FFI

The libffi library doesn't understand zero-sized objects.
When we see a zero-sized field in a struct, just skip it when
converting to the FFI data structures. There is no value to pass in
any case, so not telling libffi about the field doesn't affect
anything.

The test case for this is https://golang.org/cl/123316.

Fixes golang/go#26335

Change-Id: Ifebefee76596508990c900c58af48be08a549674
Reviewed-on: https://go-review.googlesource.com/123335
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
1 file changed