You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
- avoid type punning / strict aliasing violations
- don't rely on implementation defined placement of bit-fields in the
storage unit.
(cherry picked from commit b9c243a)
- avoid type punning / strict aliasing violations
- don't rely on implementation defined placement of bit-fields in the
storage unit.
(cherry picked from commit 5512131)
- avoid type punning / strict aliasing violations
- don't rely on implementation defined placement of bit-fields in the
storage unit.
(cherry picked from commit b9c243a)
Stackless contributes two tests to builtins: TaskletExit and
TaskletExit.__init__. Therefore we have to adjust the limit.
Add missing changelog entries (#143, #144).
Stackless contributes two tests to builtins: TaskletExit and
TaskletExit.__init__. Therefore we have to adjust the limit.
Add missing changelog entries (#143, #144).
(cherry picked from commit 7327e4b)
Stackless contributes two tests to builtins: TaskletExit and
TaskletExit.__init__. Therefore we have to adjust the limit.
Add missing changelog entries (#143, #144).
(cherry picked from commit 7327e4b)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The text was updated successfully, but these errors were encountered: