New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
''.find() gives wrong result in Python built with ICC #45425
Comments
I have just encountered a strange bug affecting Python 2.5.1 on an I have narrowed down the issue to the simple test case "foo2/bar/".find ("/bar/") Observe: On a GCC-compiled Python 2.5.1, the command works as [c705213@hc-ma tmp]$ /usr/site/hc-2.6/python/gnu/2.5.1/bin/python2.5
Python 2.5.1 (r251:54863, Aug 30 2007, 16:21:23)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print "foo2/**bar**/".find ("/**bar**/")
4 On my Python 2.5.1 installation which was compiled from source with the [c705213@hc-ma tmp]$ /usr/site/hc-2.6/python/intel/2.5.1/bin/python2.5
Python 2.5.1 (r251:54863, Aug 30 2007, 16:20:06)
[GCC Intel(R) C++ gcc 3.4 mode] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print "foo2/**bar**/".find ("/**bar**/")
-1 What could have possibly gone wrong here? Admittedly, this smacks more Obvious first question: Does anyone else out here have an ICC-compiled Any idea what kind of oddity I have stumbled over here? Obviously, it Additional information:
|
It definitely sounds like a compiler bug. Unless you can provide further If you want to analyze this further, here is a number of things you can try:
|
Martin, you are right: is is related to compiler optimization. I have So, it seems that the lesson is simply once again: Do not use '-O3' with On the other hand, Python's ./configure script is quite clear in its |
If you are curious, we could now try to find out what precisely goes
a) resolve the includes manually, then strip everything that isn't b) try simplifying the code, e.g. replace str_len and sub_len with c) when further simplification is not possible (while keeping the Alternatively, sent this or some further-simplified version to Intel Assuming this is too much effort, I'll close this as "won't fix - third |
Martin: I've boiled down the test case a bit more and removed all |
Update to the story: After I submitted the bug report to Intel, they I have just got an e-mail from Intel that the newest available version In principle the problem should vanish now, but I have not found the |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: