This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sanders_muc
Recipients sanders_muc
Date 2007-09-01.22:59:18
SpamBayes Score 0.28118703
Marked as misclassified No
Message-id <>
I have just encountered a strange bug affecting Python 2.5.1 on an
x86_64 Linux, but only when compiled with the Intel C Compiler (ICC)
10.0, not a GCC-compiled Python. On my Intel-compiled one, which
otherwise seems to work fine, ''.find() works incorrectly.

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
expected by returning 4:

  [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**/")

On my Python 2.5.1 installation which was compiled from source with the
Intel C Compiler (ICC) for Linux, version 10.0, '-1' is returned:

  [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**/")

What could have possibly gone wrong here? Admittedly, this smacks more
of a bug in icc than in Python, but I report it here, as I feel at loss
of what else to do with it.

Obvious first question: Does anyone else out here have an ICC-compiled
Python handy  to check whether the bug reproduces elsewhere?

Any idea what kind of oddity I have stumbled over here? Obviously, it
could simply be that something went wrong when compiling Python from
source with ICC, but it should not happen that the interpreter
nebertheless starts up and fails only silently.

Additional information:

- I have stumbled over the problem when trying to install Numpy,
as the built failed at the point where a script '',
which is part of NumPy's installtion system, is started to do some
pattern replacements in a file called ''. My test
case is reduced from this script.

- The system is the master node of a compute cluster with AMD Opteron
CPUs. The cluster is not involved, all was done on the master node. The
box runs RedHat Enterprise Linux 4.0 Advanced Server. It replies to
'uname -a' with:
   Linux 2.6.9-42.0.10.ELsmp #1 SMP Fri Feb 16 17:13:42
EST 2007 x86_64 x86_64 x86_64 GNU/Linux

- The dynamic dependencies of the GCC-compiled and the ICC-compiled
Python binaries are:
[c705213@hc-ma tmp]$ ldd /usr/site/hc-2.6/python/gnu/2.5.1/bin/python2.5 => /lib64/tls/ (0x0000003702900000) => /lib64/ (0x0000003701d00000) => /lib64/ (0x0000003703900000) => /lib64/tls/ (0x0000003701b00000) => /lib64/tls/ (0x0000003701800000)
        /lib64/ (0x0000003701600000)
[c705213@hc-ma tmp]$ ldd /usr/site/hc-2.6/python/intel/2.5.1/bin/python2.5 => /lib64/tls/ (0x0000003702900000) => /lib64/ (0x0000003701d00000) => /lib64/ (0x0000003703900000) => /usr/site/hc-2.6/intel/10.0/cc/lib/
(0x0000002a95579000) => /lib64/tls/ (0x0000003701b00000) => /lib64/ (0x0000003705800000) => /lib64/tls/ (0x0000003701800000)
        /lib64/ (0x0000003701600000)

- The precise revision of Python is "Python 2.5.1 (r251:54863)".

- The test case ceases to show failure if the string is only slightly
altered, e.g. if the word 'foo', the word 'bar' or the one of the
asterisks or one of the slashes is cut out in both search and target string.
Date User Action Args
2007-09-01 22:59:21sanders_mucsetspambayes_score: 0.281187 -> 0.28118703
recipients: + sanders_muc
2007-09-01 22:59:20sanders_mucsetspambayes_score: 0.281187 -> 0.281187
messageid: <>
2007-09-01 22:59:20sanders_muclinkissue1084 messages
2007-09-01 22:59:18sanders_muccreate