Created
August 1, 2020 20:51
-
-
Save leikahing/d42df1b436a6c853c50b1d09ecef3e58 to your computer and use it in GitHub Desktop.
HHVM core debugging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hunting down an issue stemming from https://github.com/facebook/hhvm/blob/master/hphp/runtime/base/string-data.cpp#L84 | |
(gdb) bt | |
#0 raise (sig=11) at ../sysdeps/unix/sysv/linux/raise.c:50 | |
#1 0x00000000049eca29 in HPHP::bt_handler(int, siginfo_t*, void*) (sigin=<optimized out>, info=<optimized out>) | |
at hphp/runtime/base/crash-reporter.cpp:270 | |
#2 0x00007faf1f091b80 in <signal handler called> () at /usr/local/fbcode/platform007/lib/libpthread.so.0 | |
#3 0x00000000008ecc55 in HPHP::StringData::MakeShared<true>(folly::Range<char const*>) (sl=...) | |
at buck-out/opt-hhvm-lto/gen/hphp/runtime/headers#header-mode-symlink-tree-only,headers,v5c9e8e3/hphp/runtime/base/header- | |
kind.h:233 | |
#4 HPHP::StringData::MakeStatic(folly::Range<char const*>) (sl=...) at hphp/runtime/base/string-data.cpp:109 | |
#5 0x00000000008ebf86 in HPHP::(anonymous namespace)::insertStaticStringSlice (slice=...) | |
at hphp/runtime/base/static-string-table.cpp:186 | |
#6 HPHP::makeStaticString(folly::Range<char const*>) (slice=...) at hphp/runtime/base/static-string-table.cpp:229 | |
#7 HPHP::makeStaticString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (str=...) | |
at hphp/runtime/base/static-string-table.cpp:261 | |
#8 0x00000000008ebcda in HPHP::PreClass::manglePropName(HPHP::StringData const*, HPHP::StringData const*, HPHP::Attr) | |
(className=<optimized out>, propName=0x401daa00, attrs=<optimized out>) at hphp/runtime/vm/preclass.cpp:81 | |
#9 0x0000000004e96f10 in HPHP::PreClassEmitter::Prop::Prop(HPHP::PreClassEmitter const*, HPHP::StringData const*, HPHP::Attr, | |
HPHP::StringData const*, HPHP::TypeConstraint const&, HPHP::CompactVector<HPHP::TypeConstraint, std::allocator<char> > const& | |
, HPHP::StringData const*, HPHP::TypedValue const*, HPHP::RepoAuthType, HPHP::UserAttributeMap) | |
(userAttributes=..., repoAuthType=..., val=0x7f9ed759d218, docComment=0xa6d1dc0 <HPHP::s_theEmptyString>, ubs=CompactVecto | |
r<HPHP::TypeConstraint>: 0 element(s) capacity=0, typeConstraint=..., userType=0xa6d1dc0 <HPHP::s_theEmptyString>, attrs=1064, | |
n=0x401daa00, pce=0x7f96de1d2700, this=0x7fad754e0440) at hphp/runtime/vm/preclass-emitter.cpp:98 | |
#10 HPHP::PreClassEmitter::addProperty(HPHP::StringData const*, HPHP::Attr, HPHP::StringData const*, HPHP::TypeConstraint cons | |
t&, HPHP::CompactVector<HPHP::TypeConstraint, std::allocator<char> > const&, HPHP::StringData const*, HPHP::TypedValue const*, | |
HPHP::RepoAuthType, HPHP::UserAttributeMap) [clone .isra.0] | |
(this=this@entry=0x7f96de1d2700, n=0x401daa00, attrs=1064, userType=0xa6d1dc0 <HPHP::s_theEmptyString>, typeConstraint=... | |
, ubs=CompactVector<HPHP::TypeConstraint>: 0 element(s) capacity=0, docComment=0xa6d1dc0 <HPHP::s_theEmptyString>, val=0x7f9ed | |
759d218, repoAuthType=..., userAttributes=...) at hphp/runtime/vm/preclass-emitter.cpp:186 | |
#11 0x0000000004c3cba6 in HPHP::HHBBC::(anonymous namespace)::emit_class | |
(cls=..., offset=<optimized out>, pce=0x7f96de1d2700, ue=..., state=...) at hphp/hhbbc/emit.cpp:1395 | |
#12 HPHP::HHBBC::emit_unit(HPHP::HHBBC::Index const&, HPHP::HHBBC::php::Unit const&) (index=..., unit=...) | |
at hphp/hhbbc/emit.cpp:1557 | |
#13 0x0000000004c3d6a6 in operator()(HPHP::HHBBC::php::Unit&) const (__closure=0x7fad73cdd610, unit=...) | |
at hphp/hhbbc/whole-program.cpp:565 | |
#14 0x0000000004ca29b1 in HPHP::HHBBC::parallel::for_each<HPHP::HHBBC::(anonymous namespace)::final_pass<HPHP::HHBBC::whole_pr | |
ogram(HPHP::HHBBC::php::ProgramPtr, HPHP::HHBBC::UnitEmitterQueue&, std::unique_ptr<HPHP::ArrayTypeTable::Builder, std::defaul | |
t_delete<HPHP::ArrayTypeTable::Builder> >&, int)::{lambda(HPHP::HHBBC::php::Unit&)#2}>(HPHP::HHBBC::Index&, HPHP::HHBBC::php:: | |
Program&, HPHP::HHBBC::StatsHolder const&, HPHP::HHBBC::whole_program(HPHP::HHBBC::php::ProgramPtr, HPHP::HHBBC::UnitEmitterQu | |
eue&, std::unique_ptr<HPHP::ArrayTypeTable::Builder, std::default_delete<HPHP::ArrayTypeTable::Builder> >&, int)::{lambda(HPHP | |
::HHBBC::php::Unit&)#2})::{lambda(std::unique_ptr<HPHP::HHBBC::php::Unit, std::default_delete<HPHP::HHBBC::php::Unit> >&)#1}, | |
std::vector<std::default_delete<HPHP::HHBBC::php::Unit>, std::allocator<std::default_delete<HPHP::HHBBC::php::Unit> > >&>(std: | |
:vector<std::default_delete<HPHP::HHBBC::php::Unit>, std::allocator<std::default_delete<HPHP::HHBBC::php::Unit> > >&, HPHP::HH | |
BBC::StatsHolder const&)::{lambda()#1}::operator()() const () | |
at buck-out/opt-hhvm-lto/gen/hphp/util/trace#header-mode-symlink-tree-only,headers/hphp/util/trace.h:294 | |
#15 0x00007faf1fba66e0 in std::execute_native_thread_routine(void*) (__p=0x7fadd1db40c0) | |
at ../../../.././libstdc++-v3/src/c++11/thread.cc:83 | |
#16 0x00007faf1f0866ce in start_thread (arg=0x7fad754e8700) at pthread_create.c:465 | |
#17 0x00007faf1e76835f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 | |
(gdb) frame 3 | |
#3 0x00000000008ecc55 in HPHP::StringData::MakeShared<true> (sl=...) | |
at buck-out/opt-hhvm-lto/gen/hphp/runtime/headers#header-mode-symlink-tree-only,headers,v5c9e8e3/hphp/runtime/base/header- | |
kind.h:233 | |
233 in buck-out/opt-hhvm-lto/gen/hphp/runtime/headers#header-mode-symlink-tree-only,headers,v5c9e8e3/hphp/runtime/base/hea | |
der-kind.h | |
(gdb) info locals | |
data = 0x10 <error: Cannot access memory at address 0x10> | |
count = HPHP::StaticValue | |
mcret = <optimized out> | |
ret = <optimized out> | |
allocSize = 106 | |
sd = 0x0 | |
allocSize = <optimized out> | |
sd = <optimized out> | |
data = <optimized out> | |
count = <optimized out> | |
mcret = <optimized out> | |
ret = <optimized out> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment