diff --git a/CMakeLists.txt b/CMakeLists.txt index 0726e57a..efe2aeea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -299,6 +299,7 @@ endif (OPT_BUILD_SCHEDULER) if (MSVC) add_executable(sdrpp "src/main.cpp" "win32/resources.rc") + add_executable(min_broken "min_broken/main.cpp" "win32/resources.rc") else () add_executable(sdrpp "src/main.cpp") endif () diff --git a/min_broken/main.cpp b/min_broken/main.cpp new file mode 100644 index 00000000..843534eb --- /dev/null +++ b/min_broken/main.cpp @@ -0,0 +1,26 @@ +#include +#include + +class TestClass { +public: + TestClass() { + std::lock_guard lck(mtx); + value = 42; + } + + int getValue() { + std::lock_guard lck(mtx); + return value; + } + +private: + std::recursive_mutex mtx; + int value = 0; +}; + +TestClass test; + +int main() { + printf("Value: %d\n", test.getValue()); + return 0; +} \ No newline at end of file