Sam Price added the comment:
I’ve been looking forward to this fix. The old implementation did not
match what my LLVM compiler generated.
On Sun, Jul 11, 2021 at 2:52 PM Charles Machalow
wrote:
>
> Charles Machalow added the comment:
>
> Maybe we need to add a __packing
Sam Price added the comment:
I ran into this bug on mac and submitted a duplicate issue of 39858
If you add the check *pfield_size != *pbitofs it fixes this bug.
#ifndef MS_WIN32
} else if (bitsize /* this is a bitfield request */
&& *pfield_size /* we have a bitfi
Sam Price added the comment:
Does not happen on windows.
Error is in cfield.c
```
#ifndef MS_WIN32
} else if (bitsize /* this is a bitfield request */
&& *pfield_size /* we have a bitfield open */
&& dict->size * 8 >= *pfield_size
&&
New submission from Sam Price :
if 8 1 byte fields are included in a ctype field, it allows an extra byte to be
included in the packing when there is no room left for the next field.
If I put the bitfields in a child structure then I get expected results.
In [35]: run ctypeSizeTest.py
Size