STINNER Victor <vstin...@redhat.com> added the comment:

Extract of attached test.pythoninfo output:

sys.maxsize: 2147483647
sysconfig[PY_CFLAGS]: -fno-strict-aliasing -march=i686 -mtune=generic -O2 -pipe 
-fstack-protector-strong -fno-plt -DNDEBUG -march=i686 -mtune=generic -O2 -pipe 
-fstack-protector-strong -fno-plt -I. -IInclude -I./Include -D_FORTIFY_SOURCE=2 
-fPIC -DPy_BUILD_CORE

I tried to reproduce the issue on my x86_64 Fedora 28 (64-bit) using:

   ./configure CFLAGS="-m32" LDFLAGS="-m32" && make

But I failed to reproduce the issue. I also tried to add 
"-fstack-protector-strong -fno-plt" but I still fail to reproduce the bug.

On interesting thing is that your CFLAGS don't contain -fwrapv. You can try the 
following command to check if gcc -v --help contains -fwrapv?

"gcc -v --help|grep -- -fwrapv"

With my french locale, for example, I see:

  -fwrapv                     Supposer que le débordement de l'arithmétique 
signée boucle sur la plage accessible.

You may try to force -fwrapv using ./configure CFLAGS="-fwrapv" or directly by 
adding directly the option to the OPT variable in Makefile. Example of options 
on my x86_64 Fedora and "./configure":

OPT=            -DNDEBUG -g -fwrapv -O3 -Wall
BASECFLAGS=      -Wno-unused-result -Wsign-compare
CONFIGURE_CFLAGS_NODIST= -std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration

Note: When Python is compiled with --with-pydebug, -fwrapv is not used.

Note: Your CFLAGS use -O2 whereas Python uses -O3 by default in release mode.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34096>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to