catchorg / catchorg/Catch2

Crash when used with Quazip.

Open
#2,745 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

**Describe the bug**

I don't know if I have to put this report in Quazip or here but anyway.

Basic test crashes when Quazip is imported before Catch2. Even if tests do not use Quazip.

![image](https://github.com/catchorg/Catch2/assets/462593/d48c5633-c975-400b-9a93-0d21a9f83b4a)

If Catch2 is fetch before Quazip, everything is fine.

![image](https://github.com/catchorg/Catch2/assets/462593/bf868217-5158-4851-91b7-14a3cc23cf46)

**Expected behavior**
No crash.

**Reproduction steps**
Using [Quazip 1.4](https://github.com/stachenov/quazip/releases/tag/v1.4) with Zlib from Msys2 on Windows 11, I have this CMakeLists.txt:
```
cmake_minimum_required(VERSION 3.20)
project(Catch2v3)

add_subdirectory(quazip EXCLUDE_FROM_ALL)

# Fetch libraries from Github
include(FetchContent)

# Catch2
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.4.0
)

FetchContent_MakeAvailable(Catch2)

set(CMAKE_CXX_STANDARD 20)

add_executable(Catch2v3 main.cpp)

target_link_libraries(Catch2v3 Catch2::Catch2WithMain)
```

```cpp
// main.cpp
#include "catch2/catch_all.hpp"

TEST_CASE("Test") {
CHECK(true);
}
```

**Platform information:**

- OS: **Windows 11**
- Compiler+version: **mingw64-gcc 13.1.0**
- Catch version: **v3.4.0**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.