> On 23 Dec 2017, at 09:42, Richard Frith-Macdonald > <[email protected]> wrote: > > > >> On 23 Dec 2017, at 09:32, Richard Frith-Macdonald >> <[email protected]> wrote: >> >> >> So the difference between the offsets in the runtime (correct) and the >> compiler (wrong) was 16 bytes, with the runtime thinking the strruct size >> was 32 and trhe compiler thinking it was 16; >> >> It seems the compiler is sizing the structure as if it contained a pointer >> and two integers when it should actually be two pointers and three integers; > > No, my mistake, that's rubbish ... on a 64bit processor the fieldds only > occupy 28 bytes, so the 32 byte offset is produced by alignment rules > rounding up to a 16byte boundery. > In that case, the offsets calculated by the compiler would be consistent with > it ignoring the two __unsafe_unretained pointers. Perhaps that is a clue?
It occurs to me that this is not anything like that simple :-( While the compiler is getting the offset to _gcontext wrong, it's still getting the offset to the next ivar (_runLoopInfo) correct, so it can't just be that it's calcularing the size of the struct incorrectly. _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
