Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gleocadie committed Nov 27, 2024
1 parent 70ef530 commit 5ce79d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ std::vector<ModuleInfo> CrashReportingLinux::GetModules()
moduleBaseAddresses[path] = baseAddress;
}

modules.push_back(ModuleInfo{ start, end, baseAddress, std::move(path), ElfBuildId(path.data())});
auto buildId = ElfBuildId(path.data());
modules.push_back(ModuleInfo{ start, end, baseAddress, std::move(path), std::move(buildId) });
}

return modules;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

extern "C"
{
#ifdef LINUX
#include "datadog/blazesym.h"
#endif
#include "datadog/common.h"
#include "datadog/profiling.h"
}
Expand All @@ -39,7 +41,7 @@ class ElfBuildId
{
private:
struct ElfBuildIdImpl {
ElfBuildIdImpl() : ElfBuildIdImpl(nullptr) {}
ElfBuildIdImpl() : ElfBuildIdImpl(nullptr) {}
ElfBuildIdImpl(const char* path) : _ptr{nullptr}, _size{0} {
if (path != nullptr)
{
Expand Down

0 comments on commit 5ce79d8

Please sign in to comment.