Skip to content

Commit

Permalink
Bug 699033 - tame a crash in ANGLE compiler - r=jst
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit Jacob committed Feb 23, 2012
1 parent 9d1b31c commit dfcd199
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
1 change: 1 addition & 0 deletions gfx/angle/README.mozilla
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ In this order:
angle-intrinsic-msvc2005.patch - work around a MSVC 2005 compile error
angle-limit-identifiers-to-250-chars.patch - see bug 675625
angle-use-xmalloc.patch - see bug 680840. Can drop this patch whenever the new preprocessor lands.
angle-castrate-bug-241.patch - see bug 699033 / angle bug 241

In addition to these patches, the Makefile.in files are ours, they're not present in upsteam ANGLE.

Expand Down
47 changes: 47 additions & 0 deletions gfx/angle/angle-castrate-bug-241.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# HG changeset patch
# User Benoit Jacob <bjacob@mozilla.com>
# Parent 7dcbce54a953090ae8e537f93c6c99ab8eb0dc62

diff --git a/gfx/angle/README.mozilla b/gfx/angle/README.mozilla
--- a/gfx/angle/README.mozilla
+++ b/gfx/angle/README.mozilla
@@ -4,16 +4,17 @@ Current revision: r963

== Applied local patches ==

In this order:
angle-renaming-debug.patch - rename debug.h to compilerdebug.h to avoid conflict in our makefiles
angle-intrinsic-msvc2005.patch - work around a MSVC 2005 compile error
angle-limit-identifiers-to-250-chars.patch - see bug 675625
angle-use-xmalloc.patch - see bug 680840. Can drop this patch whenever the new preprocessor lands.
+ angle-castrate-bug-241.patch - see bug 699033 / angle bug 241

In addition to these patches, the Makefile.in files are ours, they're not present in upsteam ANGLE.

== How to update this ANGLE copy ==

1. Unapply patches
2. Apply diff with new ANGLE version
3. Reapply patches.
diff --git a/gfx/angle/src/compiler/Types.h b/gfx/angle/src/compiler/Types.h
--- a/gfx/angle/src/compiler/Types.h
+++ b/gfx/angle/src/compiler/Types.h
@@ -203,17 +203,17 @@ public:
bool isVector() const { return size > 1 && !matrix; }
bool isScalar() const { return size == 1 && !matrix && !structure; }

TTypeList* getStruct() const { return structure; }
void setStruct(TTypeList* s) { structure = s; computeDeepestStructNesting(); }

const TString& getTypeName() const
{
- assert(typeName);
+ if(!typeName) abort();
return *typeName;
}
void setTypeName(const TString& n)
{
typeName = NewPoolTString(n.c_str());
}

bool isField() const { return fieldName != 0; }
2 changes: 1 addition & 1 deletion gfx/angle/src/compiler/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class TType {

const TString& getTypeName() const
{
assert(typeName);
if(!typeName) abort();
return *typeName;
}
void setTypeName(const TString& n)
Expand Down

0 comments on commit dfcd199

Please sign in to comment.