Repository navigation
Conversation
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.
Problem
path_normalized_from_string("a/b/..")returns aString8with size 1, but the bytes through its NUL terminator area/b. The path list decrements its counts when removingbyet leaves that node linked.a/..likewise leaves a node in a list whose count is zero.Change
Save each stack node’s predecessor and restore the list tail when
..removes that node. Add base tests for relative paths, an empty result, leading parent segments, and a Windows absolute path.Verification
./run_tests.sh gcc debug -- path_dot_resolutionand./run_tests.sh clang debug -- path_dot_resolutioneach built all five targets and passed the new torture test (1 passed, 0 failed/crashed/skipped). The mounted checkout usedcore.filemode=false.cd build && ./torture -gcc:/usr/bin/gcc "base/*": all 7 base tests passed, 0 failed/crashed/skipped.mastersource failed the new tail assertion; the same runner passed with this patch. Directly,path_normalized_from_string("a/b/..")changed fromsize == 1with C stringa/bto size 1 with C stringa.git diff --checkpasses; the working tree is clean.The full torture matrix did not complete on WSL:
linker/long_section_namefails with unresolvedRAD_IMPORT_STUB. I reproduced the same failure on a separate untouched upstream checkout (b6d8c3f) after building bothtortureandradlink. A run excluding linker tests stalled atrdi_from_pdb/p2r_determinismwhile reporting missing debug information, so I stopped it.