http://play.golang.org/p/JjzURx7rDN I've read Russ Cox's great explanation of this stuff at
http://research.swtch.com/interfaces, and I'm trying to play with it a little bit.
I'm using reflect.Value.InterfaceData() and assuming that the the two words it returns are the the two word of the interface value Russ is talking about - he doesn't explicitly say this but looking at the source of InterfaceData() seems to confirm it - they exist side-by-side in memory and that memory location is the interface value, etc.
I'm seeing the second word pointing to the implementation binary data, as expected.
But the first word, which is supposed to point to an itab struct, appears to not be. The first word in the memory it points to is a low integer (not a valid memory address - I expected an *interfacetype as per the runtime source), and when a later field in the struct layout is accessed, the program segfaults with a memory protection violation.
So, what's going on? Did things somehow change in 1.5? Is the above explanation still valid as far as what to expect in that second word? Or is it something else, now? Or am I doing something wrong?