Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

VLOG before InitGoogleLogging causes crash #290

@oliverdain

Description

@oliverdain

I have some static initializers that call VLOG. On Linux (but not on OSX) these cause a segfault because they happen before InitGoogleLogging is called. If I change the VLOG(1) bits to LOG(INFO) I get the expected WARNING: Logging before InitGoogleLogging() is written to STDERR message and I see the logs, but everything works fine.

Looking at things in a debugger it appears that the first call to VLOG causes a call to InitVLOG3__ which then calls VLOG2Initializer which tries to access a bunch of uninitialized variables (e.g. vmodule) and that causes a segfault.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions