From 18cc753517c9787a3f131aefd05d2be429342a47 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 20 Dec 2025 17:20:18 +0000 Subject: [PATCH] Add comment highlighting known fragile code We know we can't make the struct bigger as everything caught fire when we gave freeze dumps their own path, and was fixed when we switched to a common directory and just separate filenames. Switching to wchar_t and stopping using UTF-8 here would cause a similar size increase, so similar problems are to be expected. --- components/crashcatcher/windowscrashshm.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/crashcatcher/windowscrashshm.hpp b/components/crashcatcher/windowscrashshm.hpp index 6ac09234ba..1a88f05662 100644 --- a/components/crashcatcher/windowscrashshm.hpp +++ b/components/crashcatcher/windowscrashshm.hpp @@ -40,6 +40,8 @@ namespace Crash HANDLE mSignalApp; HANDLE mSignalMonitor; HANDLE mShmMutex; + // the size defines are in UTF-16 code units, and lots of things use more UTF-8 code units, so this may explode with really long non-ASCII paths + // we can't switch to wchar_t as when we've made this struct bigger in the past, things exploded char mDumpDirectoryPath[MAX_LONG_PATH]; char mCrashDumpFileName[MAX_FILENAME]; char mFreezeDumpFileName[MAX_FILENAME];