[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-16 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

yep.  i'm going to close this, it seems arch specific.  there isn't much we can 
realistically do to prevent people overriding things to their peril for 
configure or make. :)

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-16 Thread Erich Eckner


Erich Eckner  added the comment:

ah, that would explain, why we don't get it set automatically on archlinux32 - 
there's "export OPT=$CFLAGS" right infront of ./configure ... - so $OPT is set 
and thus, -fwrapv is not appended

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-16 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

https://github.com/python/cpython/blob/2.7/configure.ac#L1067

appears to add -fwrapv as desired if the gcc or clang version being used 
supports it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-16 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

IIRC that we decided that CPython and extension modules always require -fwrapv.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

Mark, Serhiy, Gregory and other fanboys of Undefined Behaviour: it seems like 
audioop is miscompiled on x86 (32-bit) without -fwrapv :-)

--
nosy: +gregory.p.smith, mark.dickinson, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-16 Thread Erich Eckner


Erich Eckner  added the comment:

yes, you were absolutely right: just adding "-fwrapv" to $OPT is enough.

Ok, is this something, we at archlinux32 need to opt in for, or is this 
something, that the configure script should add for x86?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-16 Thread STINNER Victor


STINNER Victor  added the comment:

> yes, indeed, I just tested with your three flags-variables set and the 
> build+test succeeded - I'll have to figure out what the minimal change is, 
> though :-)

Yeah, it would be great if you can find the C flag which fixes your issue. I 
bet on -fwrapv.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-13 Thread Erich Eckner


Erich Eckner  added the comment:

yes, indeed, I just tested with your three flags-variables set and the 
build+test succeeded - I'll have to figure out what the minimal change is, 
though :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-13 Thread STINNER Victor


STINNER Victor  added the comment:

I installed Fedora 28 in 32-bit (GCC 8.1.1) in a VM to try to reproduce the 
bug, but I failed to reproduce it.

Erich Eckner: IMHO your issue comes from a C flag. Try to loop on:

touch Modules/audioop.c && make && ./python -m test test_audioop

And remove flags from PY_CFLAGS in Makefile, one by one, until the bug goes 
away, to try to identify which C flags causes your issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-13 Thread STINNER Victor

STINNER Victor  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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-13 Thread Erich Eckner


Erich Eckner  added the comment:

yes, I'm using gcc (GCC) 8.1.1 20180531
I attached the created pythoninfo

--
Added file: https://bugs.python.org/file47687/pythoninfo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like you are using [GCC 8.1.1 20180531]. Can you please run the 
following command and attach the created "pythoninfo" file to his issue?

./python -m test.pythoninfo > pythoninfo

I'm looking for your CFLAGS.

I guess that the issue is specific to 32-bit, but we have many "x86" buildbots 
building Python on various compilers and running the test suite, and all these 
buildbots are green (success).

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34096] [2.7] test_audioop.test_max() failed: AssertionError: -2147483648 != 2147483648L

2018-07-11 Thread STINNER Victor


Change by STINNER Victor :


--
title: testsuite fails assertion -> [2.7] test_audioop.test_max() failed: 
AssertionError: -2147483648 != 2147483648L

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com