Skip to content

BUG: CommandLineInterfaceTest failing with "SEH exception" on windows with v25.2 #15436

@h-vetinari

Description

@h-vetinari

In conda-forge, all 151 tests in CommandLineInterfaceTest fail with the following error:

[ RUN      ] CommandLineInterfaceTest.BasicOutput
unknown file: error: SEH exception with code 0xc0000005 thrown in the test fixture's constructor.
Stack trace:


[  FAILED  ] CommandLineInterfaceTest.BasicOutput (1 ms)

Looking for "SEH exception ...", this seems to be coming from windows directly, and is possibly related due to having some kind of ABI mismatch (alignment; MD vs MT etc.).

Given that background, it's probably worth mentioning that we're building a shared version of libprotobuf also on windows - it's conceivable that something about the CLI is always built against a static runtime?

In any case, this setup used to work without issues up until v24.4.

More context in this CI run.

What version of protobuf and what language are you using?
Version: v25.2
Language: C++

What operating system (Linux, Windows, ...) and version?

Windows (GH image windows-2022)

What runtime / compiler are you using (e.g., python version or gcc version)

VS2019

Build environment
    bzip2:           1.0.8-hcfcfb64_5        conda-forge
    ca-certificates: 2023.11.17-h56e8100_0   conda-forge
    cmake:           3.28.1-hf0feee3_0       conda-forge
    krb5:            1.21.2-heb0366b_0       conda-forge
    libcurl:         8.5.0-hd5e4a3a_0        conda-forge
    libexpat:        2.5.0-h63175ca_1        conda-forge
    libssh2:         1.11.0-h7dfc565_0       conda-forge
    libuv:           1.44.2-hcfcfb64_1       conda-forge
    libzlib:         1.2.13-hcfcfb64_5       conda-forge
    ninja:           1.11.1-h91493d7_0       conda-forge
    openssl:         3.2.0-hcfcfb64_1        conda-forge
    ucrt:            10.0.22621.0-h57928b3_0 conda-forge
    vc:              14.3-hcf57466_18        conda-forge
    vc14_runtime:    14.38.33130-h82b7239_18 conda-forge
    vs2015_runtime:  14.38.33130-hcb4865c_18 conda-forge
    vs2019_win-64:   19.29.30139-he1865b1_18 conda-forge
    vswhere:         3.1.4-h57928b3_0        conda-forge
    xz:              5.2.6-h8d14728_0        conda-forge
    zstd:            1.5.5-h12be248_0        conda-forge
Host environment
    gtest:           1.14.0-h91493d7_1           conda-forge
    jsoncpp:         1.9.5-h2d74725_1            conda-forge
    libabseil:       20230802.1-cxx17_h63175ca_0 conda-forge
    libabseil-tests: 20230802.1-cxx17_h63175ca_0 conda-forge
    libzlib:         1.2.13-hcfcfb64_5           conda-forge
    ucrt:            10.0.22621.0-h57928b3_0     conda-forge
    vc:              14.3-hcf57466_18            conda-forge
    vc14_runtime:    14.38.33130-h82b7239_18     conda-forge
    vs2015_runtime:  14.38.33130-hcb4865c_18     conda-forge
    zlib:            1.2.13-hcfcfb64_5           conda-forge

What did you do?

mkdir build
cd build
cmake -G "Ninja" ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DCMAKE_CXX_STANDARD=17 ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
    -Dprotobuf_ABSL_PROVIDER="package" ^
    -Dprotobuf_BUILD_SHARED_LIBS=ON ^
    -Dprotobuf_JSONCPP_PROVIDER="package" ^
    -Dprotobuf_MSVC_STATIC_RUNTIME=OFF ^
    -Dprotobuf_USE_EXTERNAL_GTEST=ON ^
    -Dprotobuf_WITH_ZLIB=ON ^
    ..
if %ERRORLEVEL% neq 0 exit 1

cmake --build .
if %ERRORLEVEL% neq 0 exit 1

ctest --progress --output-on-failure
if %ERRORLEVEL% neq 0 exit 1

What did you expect to see

Passing test suite

What did you see instead?

See above

Anything else we should know about your project / environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions