Changeset 88355 in webkit


Ignore:
Timestamp:
Jun 8, 2011 10:14:30 AM (13 years ago)
Author:
Ademar Reis
Message:

2011-06-08 Ademar de Souza Reis Jr. <Ademar Reis>

Reviewed by Andreas Kling.

Webkit on SPARC Solaris has wrong endian
https://bugs.webkit.org/show_bug.cgi?id=29407

Bug 57256 fixed one crash on misaligned reads on sparc/solaris, but
there are more ocurrences of the same code pattern in webkit.

This patch includes the check on these other parts of the code.

This is a speculative fix, I don't have a sparc machine to test and
don't know which kind of test would trigger a crash (but it's quite
obvious that it's the same code duplicated in different files).

  • runtime/UString.h: (JSC::UStringHash::equal):
  • wtf/text/StringHash.h: (WTF::StringHash::equal):
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r88350 r88355  
     12011-06-08  Ademar de Souza Reis Jr.  <ademar.reis@openbossa.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        Webkit on SPARC Solaris has wrong endian
     6        https://bugs.webkit.org/show_bug.cgi?id=29407
     7
     8        Bug 57256 fixed one crash on misaligned reads on sparc/solaris, but
     9        there are more ocurrences of the same code pattern in webkit.
     10
     11        This patch includes the check on these other parts of the code.
     12
     13        This is a speculative fix, I don't have a sparc machine to test and
     14        don't know which kind of test would trigger a crash (but it's quite
     15        obvious that it's the same code duplicated in different files).
     16
     17        * runtime/UString.h:
     18        (JSC::UStringHash::equal):
     19        * wtf/text/StringHash.h:
     20        (WTF::StringHash::equal):
     21
    1222011-06-08  Yael Aharon  <yael.aharon@nokia.com>
    223
  • trunk/Source/JavaScriptCore/runtime/UString.h

    r83637 r88355  
    203203        // FIXME: perhaps we should have a more abstract macro that indicates when
    204204        // going 4 bytes at a time is unsafe
    205 #if CPU(ARM) || CPU(SH4) || CPU(MIPS)
     205#if CPU(ARM) || CPU(SH4) || CPU(MIPS) || CPU(SPARC)
    206206        const UChar* aChars = a->characters();
    207207        const UChar* bChars = b->characters();
  • trunk/Source/JavaScriptCore/wtf/text/StringHash.h

    r83664 r88355  
    5656            // FIXME: perhaps we should have a more abstract macro that indicates when
    5757            // going 4 bytes at a time is unsafe
    58 #if CPU(ARM) || CPU(SH4) || CPU(MIPS)
     58#if CPU(ARM) || CPU(SH4) || CPU(MIPS) || CPU(SPARC)
    5959            const UChar* aChars = a->characters();
    6060            const UChar* bChars = b->characters();
Note: See TracChangeset for help on using the changeset viewer.