aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/libsampler/sampler.cc
diff options
context:
space:
mode:
authorMyles Borins <mylesborins@google.com>2017-09-15 16:04:33 +0200
committerMichaël Zasso <targos@protonmail.com>2017-09-18 11:41:47 +0200
commit9b996f01131164d606164224389d9e1ef9d69c9c (patch)
tree79c6ca2475fd95840fcd9ca7184f6ebbdd791bce /deps/v8/src/libsampler/sampler.cc
parent75f7b2f5773ad77887b20c757081f11a73aafc07 (diff)
downloadandroid-node-v8-9b996f01131164d606164224389d9e1ef9d69c9c.tar.gz
android-node-v8-9b996f01131164d606164224389d9e1ef9d69c9c.tar.bz2
android-node-v8-9b996f01131164d606164224389d9e1ef9d69c9c.zip
deps: patch V8 to 6.1.534.38
Created using the update-v8 npm module and the command `update-v8 minor`. Refs: https://github.com/v8/v8/compare/6.1.534.36...6.1.534.38 PR-URL: https://github.com/nodejs/node/pull/15431 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'deps/v8/src/libsampler/sampler.cc')
-rw-r--r--deps/v8/src/libsampler/sampler.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/deps/v8/src/libsampler/sampler.cc b/deps/v8/src/libsampler/sampler.cc
index 8b351613e7..7519720beb 100644
--- a/deps/v8/src/libsampler/sampler.cc
+++ b/deps/v8/src/libsampler/sampler.cc
@@ -450,11 +450,18 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) {
state->sp = reinterpret_cast<void*>(mcontext.gregs[29]);
state->fp = reinterpret_cast<void*>(mcontext.gregs[30]);
#elif V8_HOST_ARCH_PPC
+#if V8_LIBC_GLIBC
state->pc = reinterpret_cast<void*>(ucontext->uc_mcontext.regs->nip);
state->sp =
reinterpret_cast<void*>(ucontext->uc_mcontext.regs->gpr[PT_R1]);
state->fp =
reinterpret_cast<void*>(ucontext->uc_mcontext.regs->gpr[PT_R31]);
+#else
+ // Some C libraries, notably Musl, define the regs member as a void pointer
+ state->pc = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[32]);
+ state->sp = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[1]);
+ state->fp = reinterpret_cast<void*>(ucontext->uc_mcontext.gp_regs[31]);
+#endif
#elif V8_HOST_ARCH_S390
#if V8_TARGET_ARCH_32_BIT
// 31-bit target will have bit 0 (MSB) of the PSW set to denote addressing