On a build with gcc 4.4.3 (with --disable-jemalloc --enable-valgrind), I see these quite consistently in valgrind after typing in the Web Console:
==1460== Invalid write of size 8 ==1460== at 0x8B3349E: js::CrossCompartmentWrapper::iterate(JSContext*, JSObject*, unsigned int, JS::Value*) (jscntxt.h:2220) ==1460== by 0x8ADEBF4: js::Proxy::iterate(JSContext*, JSObject*, unsigned int, JS::Value*) (jsproxy.cpp:860) ==1460== by 0x8AA4971: js::GetIterator(JSContext*, JSObject*, unsigned int, JS::Value*) (jsiter.cpp:655) ==1460== by 0x8AA4D1C: js_ValueToIterator(JSContext*, unsigned int, JS::Value*) (jsiter.cpp:789) ==1460== by 0x8A9282C: js::Interpret(JSContext*, js::StackFrame*, js::InterpMode) (jsinterp.cpp:2465) ==1460== by 0x8A8F33B: js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct) (jsinterp.cpp:647) ==1460== by 0x8A5E244: js::CallOrConstructBoundFunction(JSContext*, unsigned int, JS::Value*) (jsinterp.h:148) ==1460== by 0x8A8F1B6: js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:297) ==1460== by 0x8A8F8C5: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*) (jsinterp.h:148) ==1460== by 0x8A16B9B: JS_CallFunctionValue (jsapi.cpp:5199) ==1460== by 0x851673F: nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJSClass.cpp:1530) ==1460== by 0x851140E: nsXPCWrappedJS::CallMethod(unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJS.cpp:611) ==1460== Address 0x1ead2338 is 0 bytes after a block of size 8 alloc'd ==1460== at 0x4C274A8: malloc (vg_replace_malloc.c:236) ==1460== by 0x857D3D5: js::Vector<long, 8ul, js::TempAllocPolicy>::growStorageBy(unsigned long) (Utility.h:166) ==1460== by 0x8B335A2: js::CrossCompartmentWrapper::iterate(JSContext*, JSObject*, unsigned int, JS::Value*) (Vector.h:675) ==1460== by 0x8ADEBF4: js::Proxy::iterate(JSContext*, JSObject*, unsigned int, JS::Value*) (jsproxy.cpp:860) ==1460== by 0x8AA4971: js::GetIterator(JSContext*, JSObject*, unsigned int, JS::Value*) (jsiter.cpp:655) ==1460== by 0x8AA4D1C: js_ValueToIterator(JSContext*, unsigned int, JS::Value*) (jsiter.cpp:789) ==1460== by 0x8A9282C: js::Interpret(JSContext*, js::StackFrame*, js::InterpMode) (jsinterp.cpp:2465) ==1460== by 0x8A8F33B: js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct) (jsinterp.cpp:647) ==1460== by 0x8A5E244: js::CallOrConstructBoundFunction(JSContext*, unsigned int, JS::Value*) (jsinterp.h:148) ==1460== by 0x8A8F1B6: js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:297) ==1460== by 0x8A8F8C5: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*) (jsinterp.h:148) ==1460== by 0x8A16B9B: JS_CallFunctionValue (jsapi.cpp:5199) ==1460== ==1460== Invalid write of size 8 ==1460== at 0x8B334B0: js::CrossCompartmentWrapper::iterate(JSContext*, JSObject*, unsigned int, JS::Value*) (jscntxt.h:2220) ==1460== by 0x8ADEBF4: js::Proxy::iterate(JSContext*, JSObject*, unsigned int, JS::Value*) (jsproxy.cpp:860) ==1460== by 0x8AA4971: js::GetIterator(JSContext*, JSObject*, unsigned int, JS::Value*) (jsiter.cpp:655) ==1460== by 0x8AA4D1C: js_ValueToIterator(JSContext*, unsigned int, JS::Value*) (jsiter.cpp:789) ==1460== by 0x8A9282C: js::Interpret(JSContext*, js::StackFrame*, js::InterpMode) (jsinterp.cpp:2465) ==1460== by 0x8A8F33B: js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct) (jsinterp.cpp:647) ==1460== by 0x8A5E244: js::CallOrConstructBoundFunction(JSContext*, unsigned int, JS::Value*) (jsinterp.h:148) ==1460== by 0x8A8F1B6: js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:297) ==1460== by 0x8A8F8C5: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*) (jsinterp.h:148) ==1460== by 0x8A16B9B: JS_CallFunctionValue (jsapi.cpp:5199) ==1460== by 0x851673F: nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJSClass.cpp:1530) ==1460== by 0x851140E: nsXPCWrappedJS::CallMethod(unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJS.cpp:611) ==1460== Address 0x1ead28c0 is not stack'd, malloc'd or (recently) free'd ==1460== ==1460== Invalid write of size 8 ==1460== at 0x8B334FC: js::CrossCompartmentWrapper::iterate(JSContext*, JSObject*, unsigned int, JS::Value*) (jswrapper.cpp:679) ==1460== by 0x8ADEBF4: js::Proxy::iterate(JSContext*, JSObject*, unsigned int, JS::Value*) (jsproxy.cpp:860) ==1460== by 0x8AA4971: js::GetIterator(JSContext*, JSObject*, unsigned int, JS::Value*) (jsiter.cpp:655) ==1460== by 0x8AA4D1C: js_ValueToIterator(JSContext*, unsigned int, JS::Value*) (jsiter.cpp:789) ==1460== by 0x8A9282C: js::Interpret(JSContext*, js::StackFrame*, js::InterpMode) (jsinterp.cpp:2465) ==1460== by 0x8A8F33B: js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct) (jsinterp.cpp:647) ==1460== by 0x8A5E244: js::CallOrConstructBoundFunction(JSContext*, unsigned int, JS::Value*) (jsinterp.h:148) ==1460== by 0x8A8F1B6: js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:297) ==1460== by 0x8A8F8C5: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*) (jsinterp.h:148) ==1460== by 0x8A16B9B: JS_CallFunctionValue (jsapi.cpp:5199) ==1460== by 0x851673F: nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJSClass.cpp:1530) ==1460== by 0x851140E: nsXPCWrappedJS::CallMethod(unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJS.cpp:611) ==1460== Address 0x1ead2338 is 0 bytes after a block of size 8 alloc'd ==1460== at 0x4C274A8: malloc (vg_replace_malloc.c:236) ==1460== by 0x857D3D5: js::Vector<long, 8ul, js::TempAllocPolicy>::growStorageBy(unsigned long) (Utility.h:166) ==1460== by 0x8B335A2: js::CrossCompartmentWrapper::iterate(JSContext*, JSObject*, unsigned int, JS::Value*) (Vector.h:675) ==1460== by 0x8ADEBF4: js::Proxy::iterate(JSContext*, JSObject*, unsigned int, JS::Value*) (jsproxy.cpp:860) ==1460== by 0x8AA4971: js::GetIterator(JSContext*, JSObject*, unsigned int, JS::Value*) (jsiter.cpp:655) ==1460== by 0x8AA4D1C: js_ValueToIterator(JSContext*, unsigned int, JS::Value*) (jsiter.cpp:789) ==1460== by 0x8A9282C: js::Interpret(JSContext*, js::StackFrame*, js::InterpMode) (jsinterp.cpp:2465) ==1460== by 0x8A8F33B: js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct) (jsinterp.cpp:647) ==1460== by 0x8A5E244: js::CallOrConstructBoundFunction(JSContext*, unsigned int, JS::Value*) (jsinterp.h:148) ==1460== by 0x8A8F1B6: js::InvokeKernel(JSContext*, js::CallArgs, js::MaybeConstruct) (jscntxtinlines.h:297) ==1460== by 0x8A8F8C5: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*) (jsinterp.h:148) ==1460== by 0x8A16B9B: JS_CallFunctionValue (jsapi.cpp:5199)
And this in a debug build, I get this before it crashes too:
Assertion failure: mLength + incr <= mCapacity, at ./../../dist/include/js/Vector.h:678
On a build with gcc 4.4.3 (with --disable-jemalloc --enable-valgrind), I see these quite consistently in valgrind after typing in the Web Console:
==1460== Invalid write of size 8 tmentWrapper: :iterate( JSContext* , JSObject*, unsigned int, JS::Value*) (jscntxt.h:2220) :iterate( JSContext* , JSObject*, unsigned int, JS::Value*) (jsproxy.cpp:860) (JSContext* , JSObject*, unsigned int, JS::Value*) (jsiter.cpp:655) tor(JSContext* , unsigned int, JS::Value*) (jsiter.cpp:789) JSContext* , js::StackFrame*, js::InterpMode) (jsinterp.cpp:2465) l(JSContext* , js::CallArgs, js::MaybeConstruct) (jsinterp.cpp:647) ructBoundFuncti on(JSContext* , unsigned int, JS::Value*) (jsinterp.h:148) l(JSContext* , js::CallArgs, js::MaybeConstruct) (jscntxtinlines .h:297) JSContext* , JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*) (jsinterp.h:148) Value (jsapi.cpp:5199) lass::CallMetho d(nsXPCWrappedJ S*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJSCl ass.cpp: 1530) :CallMethod( unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJS. cpp:611) malloc. c:236) licy>:: growStorageBy( unsigned long) (Utility.h:166) tmentWrapper: :iterate( JSContext* , JSObject*, unsigned int, JS::Value*) (Vector.h:675) :iterate( JSContext* , JSObject*, unsigned int, JS::Value*) (jsproxy.cpp:860) (JSContext* , JSObject*, unsigned int, JS::Value*) (jsiter.cpp:655) tor(JSContext* , unsigned int, JS::Value*) (jsiter.cpp:789) JSContext* , js::StackFrame*, js::InterpMode) (jsinterp.cpp:2465) l(JSContext* , js::CallArgs, js::MaybeConstruct) (jsinterp.cpp:647) ructBoundFuncti on(JSContext* , unsigned int, JS::Value*) (jsinterp.h:148) l(JSContext* , js::CallArgs, js::MaybeConstruct) (jscntxtinlines .h:297) JSContext* , JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*) (jsinterp.h:148) Value (jsapi.cpp:5199) tmentWrapper: :iterate( JSContext* , JSObject*, unsigned int, JS::Value*) (jscntxt.h:2220) :iterate( JSContext* , JSObject*, unsigned int, JS::Value*) (jsproxy.cpp:860) (JSContext* , JSObject*, unsigned int, JS::Value*) (jsiter.cpp:655) tor(JSContext* , unsigned int, JS::Value*) (jsiter.cpp:789) JSContext* , js::StackFrame*, js::InterpMode) (jsinterp.cpp:2465) l(JSContext* , js::CallArgs, js::MaybeConstruct) (jsinterp.cpp:647) ructBoundFuncti on(JSContext* , unsigned int, JS::Value*) (jsinterp.h:148) l(JSContext* , js::CallArgs, js::MaybeConstruct) (jscntxtinlines .h:297) JSContext* , JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*) (jsinterp.h:148) Value (jsapi.cpp:5199) lass::CallMetho d(nsXPCWrappedJ S*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJSCl ass.cpp: 1530) :CallMethod( unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJS. cpp:611) tmentWrapper: :iterate( JSContext* , JSObject*, unsigned int, JS::Value*) (jswrapper.cpp:679) :iterate( JSContext* , JSObject*, unsigned int, JS::Value*) (jsproxy.cpp:860) (JSContext* , JSObject*, unsigned int, JS::Value*) (jsiter.cpp:655) tor(JSContext* , unsigned int, JS::Value*) (jsiter.cpp:789) JSContext* , js::StackFrame*, js::InterpMode) (jsinterp.cpp:2465) l(JSContext* , js::CallArgs, js::MaybeConstruct) (jsinterp.cpp:647) ructBoundFuncti on(JSContext* , unsigned int, JS::Value*) (jsinterp.h:148) l(JSContext* , js::CallArgs, js::MaybeConstruct) (jscntxtinlines .h:297) JSContext* , JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*) (jsinterp.h:148) Value (jsapi.cpp:5199) lass::CallMetho d(nsXPCWrappedJ S*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJSCl ass.cpp: 1530) :CallMethod( unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) (XPCWrappedJS. cpp:611) malloc. c:236) licy>:: growStorageBy( unsigned long) (Utility.h:166) tmentWrapper: :iterate( JSContext* , JSObject*, unsigned int, JS::Value*) (Vector.h:675) :iterate( JSContext* , JSObject*, unsigned int, JS::Value*) (jsproxy.cpp:860) (JSContext* , JSObject*, unsigned int, JS::Value*) (jsiter.cpp:655) tor(JSContext* , unsigned int, JS::Value*) (jsiter.cpp:789) JSContext* , js::StackFrame*, js::InterpMode) (jsinterp.cpp:2465) l(JSContext* , js::CallArgs, js::MaybeConstruct) (jsinterp.cpp:647) ructBoundFuncti on(JSContext* , unsigned int, JS::Value*) (jsinterp.h:148) l(JSContext* , js::CallArgs, js::MaybeConstruct) (jscntxtinlines .h:297) JSContext* , JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*) (jsinterp.h:148) Value (jsapi.cpp:5199)
==1460== at 0x8B3349E: js::CrossCompar
==1460== by 0x8ADEBF4: js::Proxy:
==1460== by 0x8AA4971: js::GetIterator
==1460== by 0x8AA4D1C: js_ValueToItera
==1460== by 0x8A9282C: js::Interpret(
==1460== by 0x8A8F33B: js::InvokeKerne
==1460== by 0x8A5E244: js::CallOrConst
==1460== by 0x8A8F1B6: js::InvokeKerne
==1460== by 0x8A8F8C5: js::Invoke(
==1460== by 0x8A16B9B: JS_CallFunction
==1460== by 0x851673F: nsXPCWrappedJSC
==1460== by 0x851140E: nsXPCWrappedJS:
==1460== Address 0x1ead2338 is 0 bytes after a block of size 8 alloc'd
==1460== at 0x4C274A8: malloc (vg_replace_
==1460== by 0x857D3D5: js::Vector<long, 8ul, js::TempAllocPo
==1460== by 0x8B335A2: js::CrossCompar
==1460== by 0x8ADEBF4: js::Proxy:
==1460== by 0x8AA4971: js::GetIterator
==1460== by 0x8AA4D1C: js_ValueToItera
==1460== by 0x8A9282C: js::Interpret(
==1460== by 0x8A8F33B: js::InvokeKerne
==1460== by 0x8A5E244: js::CallOrConst
==1460== by 0x8A8F1B6: js::InvokeKerne
==1460== by 0x8A8F8C5: js::Invoke(
==1460== by 0x8A16B9B: JS_CallFunction
==1460==
==1460== Invalid write of size 8
==1460== at 0x8B334B0: js::CrossCompar
==1460== by 0x8ADEBF4: js::Proxy:
==1460== by 0x8AA4971: js::GetIterator
==1460== by 0x8AA4D1C: js_ValueToItera
==1460== by 0x8A9282C: js::Interpret(
==1460== by 0x8A8F33B: js::InvokeKerne
==1460== by 0x8A5E244: js::CallOrConst
==1460== by 0x8A8F1B6: js::InvokeKerne
==1460== by 0x8A8F8C5: js::Invoke(
==1460== by 0x8A16B9B: JS_CallFunction
==1460== by 0x851673F: nsXPCWrappedJSC
==1460== by 0x851140E: nsXPCWrappedJS:
==1460== Address 0x1ead28c0 is not stack'd, malloc'd or (recently) free'd
==1460==
==1460== Invalid write of size 8
==1460== at 0x8B334FC: js::CrossCompar
==1460== by 0x8ADEBF4: js::Proxy:
==1460== by 0x8AA4971: js::GetIterator
==1460== by 0x8AA4D1C: js_ValueToItera
==1460== by 0x8A9282C: js::Interpret(
==1460== by 0x8A8F33B: js::InvokeKerne
==1460== by 0x8A5E244: js::CallOrConst
==1460== by 0x8A8F1B6: js::InvokeKerne
==1460== by 0x8A8F8C5: js::Invoke(
==1460== by 0x8A16B9B: JS_CallFunction
==1460== by 0x851673F: nsXPCWrappedJSC
==1460== by 0x851140E: nsXPCWrappedJS:
==1460== Address 0x1ead2338 is 0 bytes after a block of size 8 alloc'd
==1460== at 0x4C274A8: malloc (vg_replace_
==1460== by 0x857D3D5: js::Vector<long, 8ul, js::TempAllocPo
==1460== by 0x8B335A2: js::CrossCompar
==1460== by 0x8ADEBF4: js::Proxy:
==1460== by 0x8AA4971: js::GetIterator
==1460== by 0x8AA4D1C: js_ValueToItera
==1460== by 0x8A9282C: js::Interpret(
==1460== by 0x8A8F33B: js::InvokeKerne
==1460== by 0x8A5E244: js::CallOrConst
==1460== by 0x8A8F1B6: js::InvokeKerne
==1460== by 0x8A8F8C5: js::Invoke(
==1460== by 0x8A16B9B: JS_CallFunction
And this in a debug build, I get this before it crashes too:
Assertion failure: mLength + incr <= mCapacity, at ./../.. /dist/include/ js/Vector. h:678