aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2016-11-08 20:35:43 +0800
committerjbeich <jbeich@FreeBSD.org>2016-11-08 20:35:43 +0800
commitef4b6f180adc6c6d555272741babd99c6b46bd5f (patch)
tree7795d7d60670a5e8ed8367d68f14ca0216b2eb0d
parent0997eb73d8228aa686600e54a2965a7368c8fcdc (diff)
downloadfreebsd-ports-gnome-ef4b6f180adc6c6d555272741babd99c6b46bd5f.tar.gz
freebsd-ports-gnome-ef4b6f180adc6c6d555272741babd99c6b46bd5f.tar.zst
freebsd-ports-gnome-ef4b6f180adc6c6d555272741babd99c6b46bd5f.zip
gecko: backport fix for crash on 9.x (lang/gcc5 + -O3)
https://lists.freebsd.org/pipermail/freebsd-gecko/2016-November/006752.html https://bugzilla.mozilla.org/show_bug.cgi?id=757366 MFH: 2016Q4 (blanket)
-rw-r--r--mail/thunderbird/Makefile2
-rw-r--r--mail/thunderbird/files/patch-bug75736658
-rw-r--r--www/firefox-esr/Makefile1
-rw-r--r--www/firefox-esr/files/patch-bug75736658
-rw-r--r--www/firefox/Makefile2
-rw-r--r--www/firefox/files/patch-bug75736658
-rw-r--r--www/libxul/Makefile1
-rw-r--r--www/libxul/files/patch-bug75736658
-rw-r--r--www/seamonkey/Makefile2
-rw-r--r--www/seamonkey/files/patch-bug75736658
10 files changed, 295 insertions, 3 deletions
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index 8fb053427472..ecd98239ecd5 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -3,7 +3,7 @@
PORTNAME= thunderbird
DISTVERSION= 45.4.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= mail news net-im ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
diff --git a/mail/thunderbird/files/patch-bug757366 b/mail/thunderbird/files/patch-bug757366
new file mode 100644
index 000000000000..7a21b9ba111a
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug757366
@@ -0,0 +1,58 @@
+commit 2a3be4b384b9
+Author: Jonathan Kew <jkew@mozilla.com>
+Date: Mon Sep 26 18:05:14 2016 +0100
+
+ Bug 757366 - Don't cast pointers to 'name'-table data to uint16_t*, as they may not be 16-bit-aligned. r=jrmuizel
+---
+ gfx/thebes/gfxFontUtils.cpp | 26 ++++++++++++++------------
+ 1 file changed, 14 insertions(+), 12 deletions(-)
+
+diff --git gfx/thebes/gfxFontUtils.cpp gfx/thebes/gfxFontUtils.cpp
+index 526e17d..cb505e8 100644
+--- mozilla/gfx/thebes/gfxFontUtils.cpp
++++ mozilla/gfx/thebes/gfxFontUtils.cpp
+@@ -918,16 +918,18 @@ IsValidSFNTVersion(uint32_t version)
+ version == TRUETYPE_TAG('t','r','u','e');
+ }
+
+-// copy and swap UTF-16 values, assume no surrogate pairs, can be in place
++// Copy and swap UTF-16 values, assume no surrogate pairs, can be in place.
++// aInBuf and aOutBuf are NOT necessarily 16-bit-aligned, so we should avoid
++// accessing them directly as uint16_t* values.
++// aLen is count of UTF-16 values, so the byte buffers are twice that.
+ static void
+-CopySwapUTF16(const uint16_t *aInBuf, uint16_t *aOutBuf, uint32_t aLen)
++CopySwapUTF16(const char* aInBuf, char* aOutBuf, uint32_t aLen)
+ {
+- const uint16_t *end = aInBuf + aLen;
++ const char* end = aInBuf + aLen * 2;
+ while (aInBuf < end) {
+- uint16_t value = *aInBuf;
+- *aOutBuf = (value >> 8) | (value & 0xff) << 8;
+- aOutBuf++;
+- aInBuf++;
++ uint8_t b0 = *aInBuf++;
++ *aOutBuf++ = *aInBuf++;
++ *aOutBuf++ = b0;
+ }
+ }
+
+@@ -1446,13 +1448,13 @@ gfxFontUtils::DecodeFontName(const char *aNameData, int32_t aByteLen,
+ if (csName[0] == 0) {
+ // empty charset name: data is utf16be, no need to instantiate a converter
+ uint32_t strLen = aByteLen / 2;
+-#ifdef IS_LITTLE_ENDIAN
+ aName.SetLength(strLen);
+- CopySwapUTF16(reinterpret_cast<const uint16_t*>(aNameData),
+- reinterpret_cast<uint16_t*>(aName.BeginWriting()), strLen);
++#ifdef IS_LITTLE_ENDIAN
++ CopySwapUTF16(aNameData, reinterpret_cast<char*>(aName.BeginWriting()),
++ strLen);
+ #else
+- aName.Assign(reinterpret_cast<const char16_t*>(aNameData), strLen);
+-#endif
++ memcpy(aName.BeginWriting(), aNameData, strLen * 2);
++#endif
+ return true;
+ }
+
diff --git a/www/firefox-esr/Makefile b/www/firefox-esr/Makefile
index f40cd1e848d0..bec51bf65778 100644
--- a/www/firefox-esr/Makefile
+++ b/www/firefox-esr/Makefile
@@ -4,6 +4,7 @@
PORTNAME= firefox
DISTVERSION= 45.5.0
DISTVERSIONSUFFIX=esr.source
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= www ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}esr/source \
diff --git a/www/firefox-esr/files/patch-bug757366 b/www/firefox-esr/files/patch-bug757366
new file mode 100644
index 000000000000..20be9013276d
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug757366
@@ -0,0 +1,58 @@
+commit 2a3be4b384b9
+Author: Jonathan Kew <jkew@mozilla.com>
+Date: Mon Sep 26 18:05:14 2016 +0100
+
+ Bug 757366 - Don't cast pointers to 'name'-table data to uint16_t*, as they may not be 16-bit-aligned. r=jrmuizel
+---
+ gfx/thebes/gfxFontUtils.cpp | 26 ++++++++++++++------------
+ 1 file changed, 14 insertions(+), 12 deletions(-)
+
+diff --git gfx/thebes/gfxFontUtils.cpp gfx/thebes/gfxFontUtils.cpp
+index 526e17d..cb505e8 100644
+--- gfx/thebes/gfxFontUtils.cpp
++++ gfx/thebes/gfxFontUtils.cpp
+@@ -918,16 +918,18 @@ IsValidSFNTVersion(uint32_t version)
+ version == TRUETYPE_TAG('t','r','u','e');
+ }
+
+-// copy and swap UTF-16 values, assume no surrogate pairs, can be in place
++// Copy and swap UTF-16 values, assume no surrogate pairs, can be in place.
++// aInBuf and aOutBuf are NOT necessarily 16-bit-aligned, so we should avoid
++// accessing them directly as uint16_t* values.
++// aLen is count of UTF-16 values, so the byte buffers are twice that.
+ static void
+-CopySwapUTF16(const uint16_t *aInBuf, uint16_t *aOutBuf, uint32_t aLen)
++CopySwapUTF16(const char* aInBuf, char* aOutBuf, uint32_t aLen)
+ {
+- const uint16_t *end = aInBuf + aLen;
++ const char* end = aInBuf + aLen * 2;
+ while (aInBuf < end) {
+- uint16_t value = *aInBuf;
+- *aOutBuf = (value >> 8) | (value & 0xff) << 8;
+- aOutBuf++;
+- aInBuf++;
++ uint8_t b0 = *aInBuf++;
++ *aOutBuf++ = *aInBuf++;
++ *aOutBuf++ = b0;
+ }
+ }
+
+@@ -1446,13 +1448,13 @@ gfxFontUtils::DecodeFontName(const char *aNameData, int32_t aByteLen,
+ if (csName[0] == 0) {
+ // empty charset name: data is utf16be, no need to instantiate a converter
+ uint32_t strLen = aByteLen / 2;
+-#ifdef IS_LITTLE_ENDIAN
+ aName.SetLength(strLen);
+- CopySwapUTF16(reinterpret_cast<const uint16_t*>(aNameData),
+- reinterpret_cast<uint16_t*>(aName.BeginWriting()), strLen);
++#ifdef IS_LITTLE_ENDIAN
++ CopySwapUTF16(aNameData, reinterpret_cast<char*>(aName.BeginWriting()),
++ strLen);
+ #else
+- aName.Assign(reinterpret_cast<const char16_t*>(aNameData), strLen);
+-#endif
++ memcpy(aName.BeginWriting(), aNameData, strLen * 2);
++#endif
+ return true;
+ }
+
diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index d2c421b75c0e..6858a4aa5146 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -4,7 +4,7 @@
PORTNAME= firefox
DISTVERSION= 50.0
DISTVERSIONSUFFIX=.source
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= www ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
diff --git a/www/firefox/files/patch-bug757366 b/www/firefox/files/patch-bug757366
new file mode 100644
index 000000000000..20be9013276d
--- /dev/null
+++ b/www/firefox/files/patch-bug757366
@@ -0,0 +1,58 @@
+commit 2a3be4b384b9
+Author: Jonathan Kew <jkew@mozilla.com>
+Date: Mon Sep 26 18:05:14 2016 +0100
+
+ Bug 757366 - Don't cast pointers to 'name'-table data to uint16_t*, as they may not be 16-bit-aligned. r=jrmuizel
+---
+ gfx/thebes/gfxFontUtils.cpp | 26 ++++++++++++++------------
+ 1 file changed, 14 insertions(+), 12 deletions(-)
+
+diff --git gfx/thebes/gfxFontUtils.cpp gfx/thebes/gfxFontUtils.cpp
+index 526e17d..cb505e8 100644
+--- gfx/thebes/gfxFontUtils.cpp
++++ gfx/thebes/gfxFontUtils.cpp
+@@ -918,16 +918,18 @@ IsValidSFNTVersion(uint32_t version)
+ version == TRUETYPE_TAG('t','r','u','e');
+ }
+
+-// copy and swap UTF-16 values, assume no surrogate pairs, can be in place
++// Copy and swap UTF-16 values, assume no surrogate pairs, can be in place.
++// aInBuf and aOutBuf are NOT necessarily 16-bit-aligned, so we should avoid
++// accessing them directly as uint16_t* values.
++// aLen is count of UTF-16 values, so the byte buffers are twice that.
+ static void
+-CopySwapUTF16(const uint16_t *aInBuf, uint16_t *aOutBuf, uint32_t aLen)
++CopySwapUTF16(const char* aInBuf, char* aOutBuf, uint32_t aLen)
+ {
+- const uint16_t *end = aInBuf + aLen;
++ const char* end = aInBuf + aLen * 2;
+ while (aInBuf < end) {
+- uint16_t value = *aInBuf;
+- *aOutBuf = (value >> 8) | (value & 0xff) << 8;
+- aOutBuf++;
+- aInBuf++;
++ uint8_t b0 = *aInBuf++;
++ *aOutBuf++ = *aInBuf++;
++ *aOutBuf++ = b0;
+ }
+ }
+
+@@ -1446,13 +1448,13 @@ gfxFontUtils::DecodeFontName(const char *aNameData, int32_t aByteLen,
+ if (csName[0] == 0) {
+ // empty charset name: data is utf16be, no need to instantiate a converter
+ uint32_t strLen = aByteLen / 2;
+-#ifdef IS_LITTLE_ENDIAN
+ aName.SetLength(strLen);
+- CopySwapUTF16(reinterpret_cast<const uint16_t*>(aNameData),
+- reinterpret_cast<uint16_t*>(aName.BeginWriting()), strLen);
++#ifdef IS_LITTLE_ENDIAN
++ CopySwapUTF16(aNameData, reinterpret_cast<char*>(aName.BeginWriting()),
++ strLen);
+ #else
+- aName.Assign(reinterpret_cast<const char16_t*>(aNameData), strLen);
+-#endif
++ memcpy(aName.BeginWriting(), aNameData, strLen * 2);
++#endif
+ return true;
+ }
+
diff --git a/www/libxul/Makefile b/www/libxul/Makefile
index c28eec15c630..8808ee9ea477 100644
--- a/www/libxul/Makefile
+++ b/www/libxul/Makefile
@@ -3,6 +3,7 @@
PORTNAME= libxul
DISTVERSION= 45.5.0
+PORTREVISION= 1
CATEGORIES?= www devel
MASTER_SITES= MOZILLA/firefox/releases/${DISTVERSION}esr/source \
MOZILLA/firefox/candidates/${DISTVERSION}esr-candidates/build1/source
diff --git a/www/libxul/files/patch-bug757366 b/www/libxul/files/patch-bug757366
new file mode 100644
index 000000000000..20be9013276d
--- /dev/null
+++ b/www/libxul/files/patch-bug757366
@@ -0,0 +1,58 @@
+commit 2a3be4b384b9
+Author: Jonathan Kew <jkew@mozilla.com>
+Date: Mon Sep 26 18:05:14 2016 +0100
+
+ Bug 757366 - Don't cast pointers to 'name'-table data to uint16_t*, as they may not be 16-bit-aligned. r=jrmuizel
+---
+ gfx/thebes/gfxFontUtils.cpp | 26 ++++++++++++++------------
+ 1 file changed, 14 insertions(+), 12 deletions(-)
+
+diff --git gfx/thebes/gfxFontUtils.cpp gfx/thebes/gfxFontUtils.cpp
+index 526e17d..cb505e8 100644
+--- gfx/thebes/gfxFontUtils.cpp
++++ gfx/thebes/gfxFontUtils.cpp
+@@ -918,16 +918,18 @@ IsValidSFNTVersion(uint32_t version)
+ version == TRUETYPE_TAG('t','r','u','e');
+ }
+
+-// copy and swap UTF-16 values, assume no surrogate pairs, can be in place
++// Copy and swap UTF-16 values, assume no surrogate pairs, can be in place.
++// aInBuf and aOutBuf are NOT necessarily 16-bit-aligned, so we should avoid
++// accessing them directly as uint16_t* values.
++// aLen is count of UTF-16 values, so the byte buffers are twice that.
+ static void
+-CopySwapUTF16(const uint16_t *aInBuf, uint16_t *aOutBuf, uint32_t aLen)
++CopySwapUTF16(const char* aInBuf, char* aOutBuf, uint32_t aLen)
+ {
+- const uint16_t *end = aInBuf + aLen;
++ const char* end = aInBuf + aLen * 2;
+ while (aInBuf < end) {
+- uint16_t value = *aInBuf;
+- *aOutBuf = (value >> 8) | (value & 0xff) << 8;
+- aOutBuf++;
+- aInBuf++;
++ uint8_t b0 = *aInBuf++;
++ *aOutBuf++ = *aInBuf++;
++ *aOutBuf++ = b0;
+ }
+ }
+
+@@ -1446,13 +1448,13 @@ gfxFontUtils::DecodeFontName(const char *aNameData, int32_t aByteLen,
+ if (csName[0] == 0) {
+ // empty charset name: data is utf16be, no need to instantiate a converter
+ uint32_t strLen = aByteLen / 2;
+-#ifdef IS_LITTLE_ENDIAN
+ aName.SetLength(strLen);
+- CopySwapUTF16(reinterpret_cast<const uint16_t*>(aNameData),
+- reinterpret_cast<uint16_t*>(aName.BeginWriting()), strLen);
++#ifdef IS_LITTLE_ENDIAN
++ CopySwapUTF16(aNameData, reinterpret_cast<char*>(aName.BeginWriting()),
++ strLen);
+ #else
+- aName.Assign(reinterpret_cast<const char16_t*>(aNameData), strLen);
+-#endif
++ memcpy(aName.BeginWriting(), aNameData, strLen * 2);
++#endif
+ return true;
+ }
+
diff --git a/www/seamonkey/Makefile b/www/seamonkey/Makefile
index 5e0f6c757d64..35713e2f628b 100644
--- a/www/seamonkey/Makefile
+++ b/www/seamonkey/Makefile
@@ -4,7 +4,7 @@
PORTNAME= seamonkey
DISTVERSION= 2.40
MOZILLA_VER= 43 # above + 3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES?= www mail news editors irc ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
diff --git a/www/seamonkey/files/patch-bug757366 b/www/seamonkey/files/patch-bug757366
new file mode 100644
index 000000000000..7a21b9ba111a
--- /dev/null
+++ b/www/seamonkey/files/patch-bug757366
@@ -0,0 +1,58 @@
+commit 2a3be4b384b9
+Author: Jonathan Kew <jkew@mozilla.com>
+Date: Mon Sep 26 18:05:14 2016 +0100
+
+ Bug 757366 - Don't cast pointers to 'name'-table data to uint16_t*, as they may not be 16-bit-aligned. r=jrmuizel
+---
+ gfx/thebes/gfxFontUtils.cpp | 26 ++++++++++++++------------
+ 1 file changed, 14 insertions(+), 12 deletions(-)
+
+diff --git gfx/thebes/gfxFontUtils.cpp gfx/thebes/gfxFontUtils.cpp
+index 526e17d..cb505e8 100644
+--- mozilla/gfx/thebes/gfxFontUtils.cpp
++++ mozilla/gfx/thebes/gfxFontUtils.cpp
+@@ -918,16 +918,18 @@ IsValidSFNTVersion(uint32_t version)
+ version == TRUETYPE_TAG('t','r','u','e');
+ }
+
+-// copy and swap UTF-16 values, assume no surrogate pairs, can be in place
++// Copy and swap UTF-16 values, assume no surrogate pairs, can be in place.
++// aInBuf and aOutBuf are NOT necessarily 16-bit-aligned, so we should avoid
++// accessing them directly as uint16_t* values.
++// aLen is count of UTF-16 values, so the byte buffers are twice that.
+ static void
+-CopySwapUTF16(const uint16_t *aInBuf, uint16_t *aOutBuf, uint32_t aLen)
++CopySwapUTF16(const char* aInBuf, char* aOutBuf, uint32_t aLen)
+ {
+- const uint16_t *end = aInBuf + aLen;
++ const char* end = aInBuf + aLen * 2;
+ while (aInBuf < end) {
+- uint16_t value = *aInBuf;
+- *aOutBuf = (value >> 8) | (value & 0xff) << 8;
+- aOutBuf++;
+- aInBuf++;
++ uint8_t b0 = *aInBuf++;
++ *aOutBuf++ = *aInBuf++;
++ *aOutBuf++ = b0;
+ }
+ }
+
+@@ -1446,13 +1448,13 @@ gfxFontUtils::DecodeFontName(const char *aNameData, int32_t aByteLen,
+ if (csName[0] == 0) {
+ // empty charset name: data is utf16be, no need to instantiate a converter
+ uint32_t strLen = aByteLen / 2;
+-#ifdef IS_LITTLE_ENDIAN
+ aName.SetLength(strLen);
+- CopySwapUTF16(reinterpret_cast<const uint16_t*>(aNameData),
+- reinterpret_cast<uint16_t*>(aName.BeginWriting()), strLen);
++#ifdef IS_LITTLE_ENDIAN
++ CopySwapUTF16(aNameData, reinterpret_cast<char*>(aName.BeginWriting()),
++ strLen);
+ #else
+- aName.Assign(reinterpret_cast<const char16_t*>(aNameData), strLen);
+-#endif
++ memcpy(aName.BeginWriting(), aNameData, strLen * 2);
++#endif
+ return true;
+ }
+