From a4852e7d2258f39ea79585210ff94450f08429a0 Mon Sep 17 00:00:00 2001 From: Michael Holman Date: Tue, 24 Jul 2018 16:25:58 -0700 Subject: [PATCH] fix issue where helper call is reading varargs incorrectly on linux --- lib/Runtime/Language/Arguments.h | 5 +++++ lib/Runtime/Language/ProfilingHelpers.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Runtime/Language/Arguments.h b/lib/Runtime/Language/Arguments.h index bf8150ee5b2..ee3baf5e30f 100644 --- a/lib/Runtime/Language/Arguments.h +++ b/lib/Runtime/Language/Arguments.h @@ -60,6 +60,11 @@ inline int _count_args(const T1&, const T2&, const T3&, const T4&, Js::CallInfo { return 5; } +template +inline int _count_args(const T1&, const T2&, const T3&, const T4&, const T5&, Js::CallInfo callInfo) +{ + return 6; +} #endif diff --git a/lib/Runtime/Language/ProfilingHelpers.cpp b/lib/Runtime/Language/ProfilingHelpers.cpp index 3b11c4e389d..a78532c003b 100644 --- a/lib/Runtime/Language/ProfilingHelpers.cpp +++ b/lib/Runtime/Language/ProfilingHelpers.cpp @@ -547,7 +547,7 @@ using namespace Js; CallInfo callInfo, ...) { - ARGUMENTS(args, callInfo); + ARGUMENTS(args, spreadIndices, callee, framePointer, profileId, arrayProfileId, callInfo); Js::ScriptFunction *function = ScriptFunction::UnsafeFromVar(JavascriptCallStackLayout::FromFramePointer(framePointer)->functionObject); ScriptContext* scriptContext = function->GetScriptContext();