Skip to content

Commit 9625b74

Browse files
committed
[gtest] Disable new posix::FOpen Windows implementation for now
The new implementation was brought in with the gtest update in a866ce7, but it crashes when building with rpmalloc, see llvm#65823 (comment) Comment out the new implementation basically gives us the code before the gtest update.
1 parent 82001e0 commit 9625b74

File tree

1 file changed

+4
-1
lines changed
  • third-party/unittest/googletest/include/gtest/internal

1 file changed

+4
-1
lines changed

third-party/unittest/googletest/include/gtest/internal/gtest-port.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -2087,7 +2087,10 @@ GTEST_DISABLE_MSC_DEPRECATED_PUSH_()
20872087
inline int ChDir(const char* dir) { return chdir(dir); }
20882088
#endif
20892089
inline FILE* FOpen(const char* path, const char* mode) {
2090-
#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW)
2090+
// FIXME: This doesn't work when building with rpmalloc, see
2091+
// https://github.com/llvm/llvm-project/pull/65823#issuecomment-1739820534
2092+
// so hacking it out for now.
2093+
#if defined(GTEST_OS_WINDOWS) && !defined(GTEST_OS_WINDOWS_MINGW) && 0
20912094
struct wchar_codecvt : public std::codecvt<wchar_t, char, std::mbstate_t> {};
20922095
std::wstring_convert<wchar_codecvt> converter;
20932096
std::wstring wide_path = converter.from_bytes(path);

0 commit comments

Comments
 (0)