Closed Bug 635401 Opened 12 years ago Closed 12 years ago

Segfault when checking name of graphics driver vendor


(Core :: Graphics, defect)

Not set





(Reporter: jseward, Assigned: bjacob)




(1 file, 1 obsolete file)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f6fc26e8800 (LWP 7902)]
0x00007f6fc1525ed1 in mozilla::gl::GLXLibrary::EnsureInitialized (
    at /space2/sewardj/MOZ/WORKING_MC_15Feb2011/gfx/thebes/GLContextProviderGLX.cpp:186
186             if (strcmp(vendor, "NVIDIA Corporation") &&
(gdb) p vendor
$1 = 0x0
(gdb) where
#0  0x00007f6fc1525ed1 in mozilla::gl::GLXLibrary::EnsureInitialized (
    at /space2/sewardj/MOZ/WORKING_MC_15Feb2011/gfx/thebes/GLContextProviderGLX.cpp:186
#1  0x00007f6fc15264e5 in CreateOffscreenPixmapContext (
    aSize=<value optimised out>, aFormat=..., aShare=-973914720)
    at /space2/sewardj/MOZ/WORKING_MC_15Feb2011/gfx/thebes/GLContextProviderGLX.cpp:561
#2  0x00007f6fc15267f3 in mozilla::gl::GLContextProviderGLX::CreateOffscreen (
    aSize=..., aFormat=...)
    at /space2/sewardj/MOZ/WORKING_MC_15Feb2011/gfx/thebes/GLContextProviderGLX.cpp:681
#3  0x00007f6fc09fb6e6 in mozilla::WebGLContext::SetDimensions (
    this=0x7f6ec5f32130, width=300, height=150)
    at /space2/sewardj/MOZ/WORKING_MC_15Feb2011/content/canvas/src/WebGLContext.cpp:477
#4  0x00007f6fc0a69358 in nsHTMLCanvasElement::UpdateContext (
    this=0x7f6ec5d52ec0, aNewContextOptions=0x0)
    at /space2/sewardj/MOZ/WORKING_MC_15Feb2011/content/html/content/src/nsHTMLCanvasElement.cpp:611
#5  0x00007f6fc0a69832 in nsHTMLCanvasElement::GetContext (
    this=0x7f6ec5d52ec0, aContextId=..., aContextOptions=@0x7fffc5cd0858, 
---Type <return> to continue, or q <return> to quit---
    at /space2/sewardj/MOZ/WORKING_MC_15Feb2011/content/html/content/src/nsHTMLCanvasElement.cpp:534
#6  0x00007f6fc0f60435 in nsIDOMHTMLCanvasElement_GetContext (
    cx=0x7f6f57ae3760, argc=<value optimised out>, vp=0x7f6faffba270)
    at dom_quickstubs.cpp:20366
#7  0x00007f6fc17a9263 in CallJSNative (cx=0x7f6f57ae3760, 
    entryFrame=<value optimised out>, inlineCallCount=2, 
    interpMode=<value optimised out>)
    at /space2/sewardj/MOZ/WORKING_MC_15Feb2011/js/src/jscntxtinlines.h:701
#8  js::Interpret (cx=0x7f6f57ae3760, entryFrame=<value optimised out>, 
    inlineCallCount=2, interpMode=<value optimised out>)
    at /space2/sewardj/MOZ/WORKING_MC_15Feb2011/js/src/jsinterp.cpp:4764
#9  0x00007f6fc161fce5 in js::RunScript (cx=0x7f6f57ae3760, 
    script=0x7f6ec5e9eea0, fp=0x7f6faffba048)
    at /space2/sewardj/MOZ/WORKING_MC_15Feb2011/js/src/jsinterp.cpp:650
#10 0x00007f6fc162155e in js::Execute (cx=0x7f6f57ae3760, 
    chain=0x7f6f5a054120, script=0x7f6ec5e9eea0, prev=<value optimised out>, 
    flags=0, result=0x0)
    at /space2/sewardj/MOZ/WORKING_MC_15Feb2011/js/src/jsinterp.cpp:1011
#11 0x00007f6fc15c05e0 in EvaluateUCScriptForPrincipalsCommon (
    cx=0x7f6f57ae3760, obj=0x7f6f5a054120, principals=<value optimised out>, 
    chars=<value optimised out>, length=<value optimised out>, 
    filename=<value optimised out>, lineno=1, rval=0x0, 
---Type <return> to continue, or q <return> to quit---
    at /space2/sewardj/MOZ/WORKING_MC_15Feb2011/js/src/jsapi.cpp:5052
Attached patch check for null (obsolete) — Splinter Review
Assignee: nobody → bjacob
Attachment #513620 - Flags: review?(joe)
Attached patch check for nullSplinter Review
Attachment #513621 - Flags: review?(joe)
Attachment #513620 - Attachment is obsolete: true
Attachment #513620 - Flags: review?(joe)
updated: we were previously doing

   return nsnull

that was a typo as this function returns PRBool. Changed to

   return PR_FALSE
(In reply to comment #2)
> Created attachment 513621 [details] [diff] [review]


btw, this bug also causes mochitests to segfault on the same setup:

35177 INFO TEST-START | /tests/content/canvas/test/webgl/test_webgl_conformance_test_suite.html
Thread 1:
Invalid read of size 1
   at 0x658BF71: mozilla::gl::GLXLibrary::EnsureInitialized() (GLContextProviderGLX.cpp:186)
   by 0x658C584: mozilla::gl::CreateOffscreenPixmapContext(gfxIntSize const&, mozilla::gl::ContextFormat const&, int) (GLContextProviderGLX.cpp:561)
   by 0x658C892: mozilla::gl::GLContextProviderGLX::CreateOffscreen(gfxIntSize const&, mozilla::gl::ContextFormat const&) (GLContextProviderGLX.cpp:681)
   by 0x5A5E065: mozilla::WebGLContext::SetDimensions(int, int) (WebGLContext.cpp:477)
   by 0x5ACBDC7: nsHTMLCanvasElement::UpdateContext(nsIPropertyBag*) (nsHTMLCanvasElement.cpp:611)
   by 0x5ACC2A1: nsHTMLCanvasElement::GetContext(nsAString_internal const&, unsigned long const&, nsISupports**) (nsHTMLCanvasElement.cpp:534)
   by 0x5FC1D54: nsIDOMHTMLCanvasElement_GetContext(JSContext*, unsigned int, unsigned long*) (dom_quickstubs.cpp:20366)
   by 0x680DE8C: js::Interpret(JSContext*, JSStackFrame*, unsigned int, JSInterpMode) (jscntxtinlines.h:701)
   by 0x6684984: js::RunScript(JSContext*, JSScript*, JSStackFrame*) (jsinterp.cpp:666)
   by 0x6684CE1: js::Invoke(JSContext*, js::CallArgs const&, unsigned int) (jsinterp.cpp:746)
   by 0x6685814: js::ExternalInvoke(JSContext*, js::Value const&, js::Value const&, unsigned int, js::Value*, js::Value*) (jsinterp.cpp:862)
   by 0x6626470: JS_CallFunctionValue (jsapi.cpp:5072)
 Address 0x0 is not stack'd, malloc'd or (recently) free'd
Duplicate of this bug: 635325
IMO this should be in 4.0.  It's a regression both from 3.6.x and
from earlier versions of M-C -- it causes Fx to segfault on X11 VNC
servers where the earlier versions would not.
Sure --- today is a holiday in Canada, but I'll push asap.
Comment on attachment 513621 [details] [diff] [review]
check for null

In case Joe is enjoying his holiday. This looks good to me.
Attachment #513621 - Flags: review+
Attachment #513621 - Flags: review?(joe)
Comment on attachment 513621 [details] [diff] [review]
check for null

fine for checkin post-b12 branch
Attachment #513621 - Flags: approval2.0+
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.