-
-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Indicate that _PyGC_Head is only 8-byte aligned. (closes bpo-33374)
By spec, the "long double" in _PyGC_Head requires the union to always be 16-byte aligned. However, obmalloc only yields 8-byte alignment. Compilers including GCC 8 are starting to use alignment information to do store-merging. So, the "long double" needs to be changed to a simple "double" as was long ago done in Python 3 by e348c8d. For 2.7, we need to add some dummy padding to make sure _PyGC_Head stays the same size.
- Loading branch information
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Core and Builtins/2018-04-29-12-07-00.bpo-33374.-xegL6.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Tweak the definition of PyGC_Head, so compilers do not believe it is always | ||
16-byte aligned on x86. This prevents crashes with more aggressive | ||
optimizations present in GCC 8. |