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

call InitGoogleLogging get a segment fault #607

Closed
cathaysia opened this issue Jan 25, 2021 · 1 comment · Fixed by #639
Closed

call InitGoogleLogging get a segment fault #607

cathaysia opened this issue Jan 25, 2021 · 1 comment · Fixed by #639

Comments

@cathaysia
Copy link

cathaysia commented Jan 25, 2021

Env:
windows10
msys2 - mingw64

The codes are:

include(FetchContent)
FetchContent_Declare(
    glog
    GIT_REPOSITORY git@github.com:google/glog.git
    GIT_TAG v0.4.0
    SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/download_deps/glog
)
FetchContent_MakeAvailable(glog)

add_executable(${PROJECT_NAME} main.cpp)
include_directories(glog::glog)
target_link_libraries(${PROJECT_NAME} glog::glog)
#include <glog/logging.h>

int main(int argc, char** argv) {
    auto app = Gtk::Application::create(argc, argv, "com.zlt.texteditor");
    google::InitGoogleLogging(argv[0]);  //
    TextEditor w;
    return app->run(w);
}

As you see, I'm trying gtk promaring on windows. If I comment ①, it works well, other than get a segment fault. (run it in bash.exe of msys2, not cmd.exe)

when I debug it , it paused at

// stacktrace_x86_64-inl.h
static bool ready_to_run = false;
class StackTraceInit {
 public:
   StackTraceInit() {
     // Extra call to force initialization
     _Unwind_Backtrace(nop_backtrace, NULL); // stop here
     ready_to_run = true;
   }
};
@sergiud
Copy link
Collaborator

sergiud commented Apr 8, 2021

Since glog MinGW tests pass (#639), I must assume the issue is now obsolete.

@sergiud sergiud linked a pull request Apr 8, 2021 that will close this issue
@sergiud sergiud mentioned this issue May 6, 2021
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 a pull request may close this issue.

2 participants