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

[bugfix] backtrace_enable_ is modified abnormally #134

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

zmoth
Copy link
Contributor

@zmoth zmoth commented Jun 28, 2023

close #133

OS: win10
编译器: MSVC 2022
Qt版本: 6.5.0

backtrace_enable_ 默认是false,但是在进入函数GParam::addBacktrace里进行条件判断时,backtrace_enable_变为一个非零的值。且在每次运行时是随机的。

    if (likely(!backtrace_enable_)) {
        // 如果没有开启,直接返回即可
        return;
    }
sizeof(backtrace_enable_) 1
sizeof(key_) 40
sizeof(backtrace_) 64
sizeof(backtrace_lock_) 16

当不引入Qt的库即将下面的注释,上述现象又会消失。

target_link_libraries(${PROJECT_NAME} 
  PRIVATE Qt${QT_VERSION_MAJOR}::Widgets
)

判断可能是编译器将backtrace_enable_内存位置修改。所以将该变量的声明修改位置。在进行多次的清除和编译运行后正常运行。

具体原因还是需要进一步排查。

@ChunelFeng ChunelFeng merged commit 0080f22 into ChunelFeng:main Jun 28, 2023
4 checks passed
@zmoth zmoth deleted the fix branch June 28, 2023 15:33
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.

windows端和Qt一起引入, CGRAPH_GET_GPARAM_WITH_NO_EMPTY有问题
2 participants