Unportable usage of bit fields #143
Description
The "flags" member of Stackless tasklets and channels is a bit-field structure (PyTaskletFlagStruc and PyChannelFlagStruc). The methods tasklet_new, channel_new, tasklet_reduce, channel_reduce, tasklet_setstate and channel_setstate access the "flags" structure in an undefined (strict aliasing violation) or implementation defined way. Using bit-fields in a portable way is difficult and has been discussed widely. In short: placement of bit-field members in the storage unit is implementation defined. For details consult the language definition.
My fix will default to a slow but portable solution with the option to use the native memory layout, if we know that the compiler uses the conventional placement (first member starts at the least significant bit of the storage unit, other members follows immediately). Currently I know that x86 and amd64 are safe.