Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[pull] master from async-profiler:master #44

Merged
merged 3 commits into from
Feb 15, 2025
Merged
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
5 changes: 3 additions & 2 deletions src/zInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ class LateInitializer {
public:
LateInitializer() {
Dl_info dl_info;
if (dladdr((const void*)Hooks::init, &dl_info) && dl_info.dli_fname != NULL) {
if (!OS::isMusl() && dladdr((const void*)Hooks::init, &dl_info) && dl_info.dli_fname != NULL) {
// Make sure async-profiler DSO cannot be unloaded, since it contains JVM callbacks.
// Don't use ELF NODELETE flag because of https://sourceware.org/bugzilla/show_bug.cgi?id=20839
// This is not relevant for musl, where dlclose() is no-op.
// Can't use ELF NODELETE flag because of https://sourceware.org/bugzilla/show_bug.cgi?id=20839
dlopen(dl_info.dli_fname, RTLD_LAZY | RTLD_NODELETE);
}

Expand Down
4 changes: 2 additions & 2 deletions test/native/testRunner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ struct TestCase {
std::is_same<decltype(val2), const char*>::value || std::is_same<decltype(val2), char*>::value; \
if (is_string) { \
if ((std::string(#op) == "==") || (std::string(#op) == "!=")) { \
const char* str1 = reinterpret_cast<const char*>(val1); \
const char* str2 = reinterpret_cast<const char*>(val2); \
const char* str1 = (const char*)(intptr_t)(val1); \
const char* str2 = (const char*)(intptr_t)(val2); \
if ((std::string(#op) == "==" && (str1 != str2) && !(str1 && str2 && strcmp(str1, str2) == 0)) || \
(std::string(#op) == "!=" && (str1 == str2 || (str1 && str2 && strcmp(str1, str2) == 0)))) { \
printf("Assertion failed: (%s %s %s),\n\tactual values: %s = \"%s\", %s = \"%s\"\n\tat %s:%d\n", \
Expand Down
Loading