Re: [Python-Dev] Python 2.7, long double vs allocator alignment, GCC 8 on x86-64

2018-01-30 Thread Florian Weimer
* Gregory P. Smith: > The proper fix for this in the code would likely break ABI compatibility > (ie: not possible in python 2.7 or any other stable release). > > Clang's UBSAN (undefined behavior sanitizer) has been flagging this one for > a long time. > > In Python 3 a double is used instead of

Re: [Python-Dev] Python 2.7, long double vs allocator alignment, GCC 8 on x86-64

2018-01-30 Thread Benjamin Peterson
Yes, changing obmalloc.c's alignment guarantees would definitely be the easiest solution. I think someone just needs to investigate whether it wastes a lot of memory. On Tue, Jan 30, 2018, at 13:22, Gregory P. Smith wrote: > I'm curious if changing the obmalloc.c ALIGNMENT and ALIGNMENT_SHIFT >

Re: [Python-Dev] Python 2.7, long double vs allocator alignment, GCC 8 on x86-64

2018-01-30 Thread Victor Stinner
See https://bugs.python.org/issue31912 and https://bugs.python.org/issue27987 Victor 2018-01-30 19:56 GMT+01:00 Florian Weimer : > I hope this is the right list for this kind of question. We recently > tried to build Python 2.6 with GCC 8, and ran into this issue: > >

Re: [Python-Dev] Python 2.7, long double vs allocator alignment, GCC 8 on x86-64

2018-01-30 Thread Gregory P. Smith
I'm curious if changing the obmalloc.c ALIGNMENT and ALIGNMENT_SHIFT defines is sufficient to avoid ABI breakage. -gps On Tue, Jan 30, 2018 at 1:20 PM Gregory P. Smith wrote: > The proper fix for this in the code would likely break ABI compatibility > (ie: not possible in python 2.7 or any othe

Re: [Python-Dev] Python 2.7, long double vs allocator alignment, GCC 8 on x86-64

2018-01-30 Thread Gregory P. Smith
The proper fix for this in the code would likely break ABI compatibility (ie: not possible in python 2.7 or any other stable release). Clang's UBSAN (undefined behavior sanitizer) has been flagging this one for a long time. In Python 3 a double is used instead of long double since 2012 as I did s

[Python-Dev] Python 2.7, long double vs allocator alignment, GCC 8 on x86-64

2018-01-30 Thread Florian Weimer
I hope this is the right list for this kind of question. We recently tried to build Python 2.6 with GCC 8, and ran into this issue: Also quoting for context: | PyInstance_NewRaw contains this code: | | inst = PyObject_GC_New(PyInstanc