From 9625b74cdbc7576abd072dc8dbd94e07d5ea33b9 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Thu, 28 Sep 2023 20:51:20 +0200 Subject: [PATCH] [gtest] Disable new posix::FOpen Windows implementation for now The new implementation was brought in with the gtest update in a866ce789eb99da4d7a486eeb60a53be6c75f4fd, but it crashes when building with rpmalloc, see https://github.com/llvm/llvm-project/pull/65823#issuecomment-1739820534 Comment out the new implementation basically gives us the code before the gtest update. --- .../unittest/googletest/include/gtest/internal/gtest-port.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/third-party/unittest/googletest/include/gtest/internal/gtest-port.h b/third-party/unittest/googletest/include/gtest/internal/gtest-port.h index b887e24edcd0..a17349e40150 100644 --- a/third-party/unittest/googletest/include/gtest/internal/gtest-port.h +++ b/third-party/unittest/googletest/include/gtest/internal/gtest-port.h @@ -2087,7 +2087,10 @@ GTEST_DISABLE_MSC_DEPRECATED_PUSH_() inline int ChDir(const char* dir) { return chdir(dir); } #endif inline FILE* FOpen(const char* path, const char* mode) { -#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW) +// FIXME: This doesn't work when building with rpmalloc, see +// https://github.com/llvm/llvm-project/pull/65823#issuecomment-1739820534 +// so hacking it out for now. +#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW) && 0 struct wchar_codecvt : public std::codecvt {}; std::wstring_convert converter; std::wstring wide_path = converter.from_bytes(path);