Fix EGL crash: mEGLLibrary was not loaded on non-Windows, depending on uninitialized value

RESOLVED FIXED

Status

()

Core
Graphics
--
critical
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: bjacob, Assigned: bjacob)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(fennec2.0b1+)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Created attachment 478041 [details] [diff] [review]
fix EGL crasher

Look at this code:

#ifdef XP_WIN
       // .............

            angleFile->Append(NS_LITERAL_STRING("libEGL.dll"));
            angleFile->Load(&mEGLLibrary);
        } while (false);
#endif

        if (!mEGLLibrary) {
            mEGLLibrary = PR_LoadLibrary(EGL_LIB);
            if (!mEGLLibrary) {
                NS_WARNING("Couldn't load EGL LIB.");
                return PR_FALSE;
            }
        }





The problem there was that mEGLLibrary was uninitialized, so when it was accidentally non-null, we failed to load EGL, giving Brad a SIGILL.
Attachment #478041 - Flags: review?(vladimir)
(Assignee)

Comment 1

7 years ago
Created attachment 478042 [details] [diff] [review]
fix EGL crasher

oops, typo
Attachment #478041 - Attachment is obsolete: true
Attachment #478042 - Flags: review?(vladimir)
Attachment #478041 - Flags: review?(vladimir)
(Assignee)

Updated

7 years ago
Assignee: nobody → bjacob
Severity: normal → critical
OS: Linux → All
Hardware: x86_64 → All
tracking-fennec: --- → 2.0b2+
tracking-fennec: 2.0b2+ → 2.0b1+
(Assignee)

Comment 2

7 years ago
http://hg.mozilla.org/mozilla-central/rev/6a603e96b8fe
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.