Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix #387: fix tls block #379

Merged
merged 15 commits into from
Jan 23, 2024
Merged

Conversation

GongChangYan
Copy link
Contributor

fix tls block

@GongChangYan GongChangYan marked this pull request as draft January 15, 2024 03:29
@GongChangYan GongChangYan marked this pull request as ready for review January 15, 2024 06:08
Options.cmake Outdated
@@ -48,7 +48,7 @@ endif (ENABLE_SQL_IO)
option(ENABLE_ASAN "Enable Address Sanitizer." OFF)
if (ENABLE_ASAN)
message("Address Sanitizer is enabled.")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -static-libasan")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_ASAN -fsanitize=address -fno-omit-frame-pointer -static-libasan")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个做什么用?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看到下面了

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DENABLE_ASAN 改完了删掉吧

@@ -445,6 +452,23 @@ TEST_F(TestCppPlugin, CppPlugin) {
"#include <stdlib.h>", (plugin::CodeType)6,
"test", true, "v1"));
}
#ifndef ENABLE_ASAN
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一般是#ifndef __SANITIZE_ADDRESS__

下面这里有内存问题?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asan下dlclose并不会真正卸载动态库,这是asan一直就有的问题了:google/sanitizers#89

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我改成__SANITIZE_ADDRESS__吧

throw InternalError("Failed to unload library [{}].", name);
// using namespace lgraph::dll;
// PluginInfo* info = dynamic_cast<PluginInfo*>(pinfo);
// if (!UnloadDynamicLibrary(info->lib_handle))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释清掉,然后留一个函数头说明一下

@@ -33,6 +33,41 @@ CppPluginManagerImpl::CppPluginManagerImpl(LightningGraph* db, const std::string

CppPluginManagerImpl::~CppPluginManagerImpl() {}

void CppPluginManagerImpl::OpenDynamicLib(const PluginInfoBase* pinfo, DynamicLibinfo &dinfo) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文件头加点儿注释说明一下tls block的问题吧

@qishipengqsp qishipengqsp changed the title fix tls block fix #387: fix tls block Jan 19, 2024
@qishipengqsp
Copy link
Collaborator

fix #387

@qishipengqsp qishipengqsp enabled auto-merge (squash) January 23, 2024 03:28
@qishipengqsp qishipengqsp merged commit b7e6103 into TuGraph-family:master Jan 23, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants