Skip to content

Commit

Permalink
Fix crash in get_executable_filename on FreeBSD
Browse files Browse the repository at this point in the history
The std::vector object needs to have the element allocated
in order to take its address.
  • Loading branch information
yurivict committed Jun 1, 2024
1 parent 3521f71 commit 03d01dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/core/prefix/src/find_prefix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ namespace hpx::util {
{
std::vector<char> buf(cb);
sysctl(mib, 4, &buf[0], &cb, nullptr, 0);
std::copy(&buf[0], &buf[cb], std::back_inserter(r));
std::copy(buf.begin(), buf.end(), std::back_inserter(r));
}

#else
Expand Down

0 comments on commit 03d01dc

Please sign in to comment.