This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Unsafe strcmp -> memcmp transformation in gcc-3.3


Roger,
      on zSeries we hit the bug you fixed for PR10339 (unsafe strcmp
 to memcmp transformation)

Scenario:
We had a fixed string right at the end of mapped memory.
A strcmp ("some _string",s) was transformed to a cmpstrsi insn, which was
up to 3.3 on zSeries really what is now (3.4) a cmpmemsi (memcmp). Due to
the memcmp semantic of our implementation of cmpstrsi we did access
over the ending '0' of the string s, enduring a program exception.

I think, this is a serious bug, what you think of backporting your fix for
PR10339
for gcc-3.3 ? In this case we could also backport out 'cmpstr' to 'cmpmem'
for
gcc-3.3
      regards, Hartmut


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]