Repository navigation
file_system: T: is a folder of each process's own in the overlay, so the title's crash files land - #8161
Open
aslan2142 wants to merge 1 commit into
Open
file_system: T: is a folder of each process's own in the overlay, so the title's crash files land#8161aslan2142 wants to merge 1 commit into
aslan2142 wants to merge 1 commit into
Conversation
T:\ mapped to <overlay>\.gta6rt-temp, one folder shared by every run and kept between runs. The title makes its crash dump and crash log there with CREATE_NEW, and a name an earlier run (or a second process) had left failed with ERROR_FILE_EXISTS (80), so no report landed (ItsNotRexed#7913, measured by Spacecer2 under Wine 11.22). T:\ now names <overlay>\.gta6rt-temp\<YYYYMMDD-HHMMSS-mmm>-pid<id>, the process's start time in UTC and its id, made on the first T: call. The start time keeps a reused process id (Wine hands each fresh prefix the same small ids) out of an old run's folder. T:\.. cannot climb into the shared folder, T:\ itself still cannot be removed or moved, and earlier runs' folders are kept so their crash files can be read. GAME: and G: are unchanged. rt::fs::scratch_dir() returns the folder, and the startup line names it: "console paths: GAME: -> ..., writes -> ..., T: -> ...". The two CMake checks of that line (run_tiny_game_console_paths, run_tiny_game_dir) and the synthetic test of the first now expect the T: part. file_system_test: a CREATE_NEW of a name earlier runs left in .gta6rt-temp succeeds and lands in the process's own folder; the folder is stable for the process; a second process (the test started again) creating the same name on the same overlay succeeds in a folder of its own; GAME: reads and writes are unchanged. On main these fail with ERROR_FILE_EXISTS (80), in this process and in the second one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Xiiano
reviewed
Nov 23, 2026
Xiiano
left a comment
There was a problem hiding this comment.
Copilot SDK:
I found one correctness issue:
scratch_run() uses PID plus a millisecond-truncated start time, which is not guaranteed unique. Rapid PID reuse can reuse a retained folder and reproduce ERROR_FILE_EXISTS. The folder should be atomically reserved or otherwise guaranteed unique.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue: #7913 (comment) (from Spacecer2's finding: #7913 (comment)).
Depends on: none. It builds on
main. Two open pull requests overlap:runtime/shims/file_system.cpp. Itsfirst = drive == Drive::Scratch ? 1 : 0has to become2.dirs.size() == 1 && kScratchDirhas to becomedirs.size() == 2, and its own test would catch that.Why
T:failedSpacecer2 found that the title's crash dump (
T:\<guid>.dmp) and crash log (T:\game-<stamp>-32.crash.log) fail withERROR_FILE_EXISTS(80). They put that down to Wine mappingT:to the host root. Onmain, though, the runtime mapsT:itself (RT-218), not Wine:T:\...goes to one folder,<overlay>\.gta6rt-temp.CREATE_NEWreturns for a name that already exists there, whether an earlier run or a second process left it.main, both in the test process and in a second process.T:is reached only by a call the shims don't cover, such as a dynamic CRTfopen(Runtime: GAME: paths through the Universal CRT's opens (RT-354) #4996 is open for those). A default prefix has not:drive at all.I could not check which call or which names the title's crash path uses, because that needs the game.
What changes
T:\now names<overlay>\.gta6rt-temp\<YYYYMMDD-HHMMSS-mmm>-pid<id>. That is the process's start time in UTC and its id. The folder is made on the firstT:call and stays the same for the whole process.T:\..cannot climb into the shared folder, andT:\still cannot be removed or moved.GAME:andG:are unchanged.rt::fs::scratch_dir()returns the folder. The startup line names it:console paths: GAME: -> ..., writes -> ..., T: -> ....run_tiny_game_console_paths,run_tiny_game_dir) andtests/test_console_paths.pynow expect theT:part.docs/boot.md(the--overlayentry) anddocs/runtime_imports.mddescribe the folder.Tested
All on Linux under Wine 11.22 (Staging). Everything is built with clang for the mingw target, not MSVC.
file_system_test, with new checks:CREATE_NEWof a name that earlier runs left in.gta6rt-temp(and in an older process's folder) succeeds and lands in this process's folder;GAME:reads and writes are unchanged.mainwith the new test: 460 checks, 19 failures. 13 are the newT:checks, includingCreateFileW(T:\crash.dmp, CREATE_NEW)failing with 80 and the second process exiting with 80.MAXIMUM_ALLOWEDfailures (file_system: a MAXIMUM_ALLOWED open of the overlay copy can write under Wine (RT-414) #5617), the same as on plainmain(446 checks, 6 failures).gta6rtwith thetiny_gamefixture (not the retail game):check_console_paths.cmakeandcheck_game_dir.cmakepass. The startup line readsT: -> ...\overlay-保存\.gta6rt-temp\20261123-180545-395-pid32.python -I tests/test_console_paths.pyandscripts/check_no_game_data.pyon the changed files pass, andgit diff --checkis clean.Not tested:
/W4 /permissive-build. CI covers those.Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change.)AI-assisted (Claude Code, Claude Opus 5.5).