Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGSEGV on startup rtValue::setObject() while compiling using clang 6.0.0 #1241

Open
dwrobel opened this issue Jun 13, 2018 · 2 comments
Open

Comments

@dwrobel
Copy link
Contributor

dwrobel commented Jun 13, 2018

Compiling using clang 6.0.0 (./dw.sh ./0150-glut-node8-clang-asan.sh) causes Spark to crash on startup as following:

Thread 1 "pxscene" received signal SIGSEGV, Segmentation fault.
rtValue::setObject (this=0x0, v=0x2b51f20) at /home/sw/projects/pxscene/pxCore/src/rtValue.cpp:238
(gdb) bt
#0  rtValue::setObject (this=0x0, v=0x2b51f20) at /home/sw/projects/pxscene/pxCore/src/rtValue.cpp:238
#1  0x00000000004f7c82 in rtValue::setObject (this=0x0, v=...) at /home/sw/projects/pxscene/pxCore/src/rtValue.cpp:255
#2  0x00000000004f9413 in rtValue::asn (this=<optimized out>, v=warning: can't find linker symbol for virtual table for `rtObjectRef' value
warning:   found `pxConstants::~pxConstants()' instead
...) at /home/sw/projects/pxscene/pxCore/src/rtValue.h:243
#3  rtValue::assign<rtObjectRef> (this=<optimized out>, t=...) at /home/sw/projects/pxscene/pxCore/src/rtValue.h:208
#4  rtPromise::then_thunk (this=<optimized out>, numArgs=<optimized out>, args=<optimized out>, r=...) at /home/sw/projects/pxscene/pxCore/src/rtPromise.h:50
#5  0x00000000004fc8a4 in rtObjectBase::Send (this=<optimized out>, messageName=0x59e96b "then", numArgs=3, args=0x7ffc650a0c30) at /home/sw/projects/pxscene/pxCore/src/rtObject.cpp:493
#6  0x00000000004fcc4e in rtObjectBase::send (this=0x7ffc650a0d00, messageName=0x59e96b "then", arg1=..., arg2=..., arg3=...) at /home/sw/projects/pxscene/pxCore/src/rtObject.cpp:526
#7  0x00000000004e2355 in rtScriptNodeUtils::rtObjectWrapper::createFromObjectReference (ctx=..., ref=...) at /home/sw/projects/pxscene/pxCore/src/rtScriptNode/rtObjectWrapper.cpp:159
#8  0x00000000004e537f in rtScriptNodeUtils::rt2js (ctx=..., v=...) at /home/sw/projects/pxscene/pxCore/src/rtScriptNode/rtWrapperUtils.cpp:428
#9  0x00000000004e39fa in rtScriptNodeUtils::rtObjectWrapper::getProperty<char const*> (prop=@0x7ffc650a0f00: 0x2b4f730 "ready", info=...) at /home/sw/projects/pxscene/pxCore/src/rtScriptNode/rtObjectWrapper.cpp:226
#10 0x00000000004e1d57 in rtScriptNodeUtils::rtObjectWrapper::getPropertyByName (prop=..., info=...) at /home/sw/projects/pxscene/pxCore/src/rtScriptNode/rtObjectWrapper.cpp:289
#11 0x00007fd09754c951 in v8::internal::PropertyCallbackArguments::Call (this=0x7ffc650a0fe0, f=0x4e1d00 <rtScriptNodeUtils::rtObjectWrapper::getPropertyByName(v8::Local<v8::String>, v8::PropertyCallbackInfo<v8::Value> const&)>, name=...) at ../deps/v8/src/handles.h:63
#12 0x00007fd09754d612 in v8::internal::(anonymous namespace)::GetPropertyWithInterceptorInternal(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::InterceptorInfo>, bool*) () at ../deps/v8/src/objects.cc:1752
#13 0x00007fd09754d706 in v8::internal::JSObject::GetPropertyWithInterceptor (it=it@entry=0x7ffc650a10d0, done=done@entry=0x7ffc650a1087) at ../deps/v8/src/handles-inl.h:118
#14 0x00007fd09755a43b in v8::internal::Object::GetProperty (it=it@entry=0x7ffc650a10d0) at ../deps/v8/src/objects.cc:1043
#15 0x00007fd0974bfa22 in v8::internal::LoadIC::Load (this=this@entry=0x7ffc650a11c0, object=object@entry=..., name=name@entry=...) at ../deps/v8/src/ic/ic.cc:459
#16 0x00007fd0974c1094 in v8::internal::__RT_impl_Runtime_LoadIC_Miss (isolate=0x275c220, args=...) at ../deps/v8/src/ic/ic.cc:2300
#17 v8::internal::Runtime_LoadIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) () at ../deps/v8/src/ic/ic.cc:2283
@kannanmadanagopalt
Copy link
Contributor

no, I haven't came across this

@dwrobel
Copy link
Contributor Author

dwrobel commented Jun 20, 2018

Hint, it crashes when compiling with -O2 - turning it off mitigates the issue.

So, it looks like an optimization related problem. See also frame #2 from the backtrace:

#2` 0x00000000004f9413 in rtValue::asn (this=<optimized out>, v=warning: can't find linker symbol for virtual table for `rtObjectRef' value warning: found `pxConstants::~pxConstants()' instead ...) at /home/sw/projects/pxscene/pxCore/src/rtValue.h:243

looks like a completely different, than expected, object/instance seems to be assigned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants