Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ std::vector<StackFrame> CrashReportingLinux::GetThreadFrames(int32_t tid, Resolv
stackFrame.isSuspicious = false;

stackFrame.buildId = module->build_id;
stackFrame.modulePath = module->path;

fs::path modulePath(module->path);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ std::vector<StackFrame> CrashReportingWindows::GetThreadFrames(int32_t tid, Reso
{
stackFrame.moduleAddress = module->startAddress;
stackFrame.buildId = module->buildId;
stackFrame.modulePath = module->path;

std::ostringstream methodName;
methodName << module->path << "!<unknown>+" << std::hex << (nativeStackFrame.AddrPC.Offset - module->startAddress);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,15 @@ int32_t CrashReporting::ResolveStacks(int32_t crashingThreadId, ResolveManagedCa
CHECK_RESULT(ddog_crasht_StackFrame_with_sp(&frame, currentFrame.sp));
CHECK_RESULT(ddog_crasht_StackFrame_with_module_base_address(&frame, currentFrame.moduleAddress));
CHECK_RESULT(ddog_crasht_StackFrame_with_relative_address(&frame, relativeAddress));

CHECK_RESULT(ddog_crasht_StackFrame_with_symbol_address(&frame, currentFrame.symbolAddress));

if (!currentFrame.modulePath.empty())
{
CHECK_RESULT(ddog_crasht_StackFrame_with_path(&frame, {currentFrame.modulePath.data(), currentFrame.modulePath.size()}));
}

auto buildId = currentFrame.buildId;
if (buildId.size() != 0)
if (!buildId.empty())
{
CHECK_RESULT(ddog_crasht_StackFrame_with_build_id(&frame, {buildId.data(), buildId.size()}));
#ifdef _WINDOWS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ struct StackFrame
uint64_t moduleAddress;
bool isSuspicious;
std::string_view buildId;
std::string_view modulePath;
};

struct Tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,15 @@ void ValidateStacktrace(JToken callstack)

foreach (var frame in frames)
{
var moduleName = frame["function"].Value<string>().Split('!').First();
string moduleName = null;

if (moduleName.Length > 0 && !moduleName.StartsWith("<") && Path.IsPathRooted(moduleName))
// we do not set the path for managed assemblies.
if (frame.ContainsKey("path"))
{
moduleName = frame["path"].Value<string>();
}

if (!string.IsNullOrEmpty(moduleName) && !moduleName.StartsWith("<") && Path.IsPathRooted(moduleName))
{
if (!validatedModules.Add(moduleName))
{
Expand Down
Loading