Bug 1025576 - Fix crash in TSymbolTableLevel::~TSymbolTableLevel with GCC 4.9. r=bjacob
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 17 Jun 2014 07:15:36 +0900
changeset 210868 d61342b2da5e0cd38349a6ad0d363e800cdca345
parent 210867 570cc828108500481427c6a381e5b4bc36d5b7d1
child 210869 0033c281d90d6bcde616011a70589591bf52902a
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs1025576
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1025576 - Fix crash in TSymbolTableLevel::~TSymbolTableLevel with GCC 4.9. r=bjacob
gfx/angle/README.mozilla
gfx/angle/angle-fix-issue-651.patch
gfx/angle/src/compiler/SymbolTable.cpp
--- a/gfx/angle/README.mozilla
+++ b/gfx/angle/README.mozilla
@@ -55,16 +55,19 @@ In this order:
     https://chromium.googlesource.com/angle/angle/+/0685fbde65a3e90d8d4d4a6c72f2cc1771617fd0
 
   angle-fix-vc12.patch:
     Fixes angle to build on Visual Studio 2013
 
   angle-d3dcc47.patch:
     Tell ANGLE about d3dcompiler_47.dll from WinSDK 8.1.
 
+  angle-fix-issue-651.patch:
+    Fixes crash in TSymbolTableLevel::~TSymbolTableLevel with GCC 4.9
+
 In addition to these patches, the Makefile.in and moz.build build files are ours,
 they're not present in upsteam ANGLE. Therefore, changes made to the build files
 should not be stored in the local .patch files.
 
 
 == How to do a clean-slate upgrade ==
 1.  Backup our moz-specific files:
       README.mozilla
new file mode 100644
--- /dev/null
+++ b/gfx/angle/angle-fix-issue-651.patch
@@ -0,0 +1,27 @@
+Fix for https://code.google.com/p/angleproject/issues/detail?id=651
+
+See https://bugzilla.mozilla.org/show_bug.cgi?id=1025576 for details.
+
+diff --git a/gfx/angle/src/compiler/SymbolTable.cpp b/gfx/angle/src/compiler/SymbolTable.cpp
+--- a/gfx/angle/src/compiler/SymbolTable.cpp
++++ b/gfx/angle/src/compiler/SymbolTable.cpp
+@@ -166,17 +166,18 @@ TFunction::~TFunction()
+ }
+ 
+ //
+ // Symbol table levels are a map of pointers to symbols that have to be deleted.
+ //
+ TSymbolTableLevel::~TSymbolTableLevel()
+ {
+     for (tLevel::iterator it = level.begin(); it != level.end(); ++it)
+-        delete (*it).second;
++        if ((*it).first == (*it).second->getMangledName())
++            delete (*it).second;
+ }
+ 
+ //
+ // Change all function entries in the table with the non-mangled name
+ // to be related to the provided built-in operation.  This is a low
+ // performance operation, and only intended for symbol tables that
+ // live across a large number of compiles.
+ //
--- a/gfx/angle/src/compiler/SymbolTable.cpp
+++ b/gfx/angle/src/compiler/SymbolTable.cpp
@@ -166,17 +166,18 @@ TFunction::~TFunction()
 }
 
 //
 // Symbol table levels are a map of pointers to symbols that have to be deleted.
 //
 TSymbolTableLevel::~TSymbolTableLevel()
 {
     for (tLevel::iterator it = level.begin(); it != level.end(); ++it)
-        delete (*it).second;
+        if ((*it).first == (*it).second->getMangledName())
+            delete (*it).second;
 }
 
 //
 // Change all function entries in the table with the non-mangled name
 // to be related to the provided built-in operation.  This is a low
 // performance operation, and only intended for symbol tables that
 // live across a large number of compiles.
 //