The linear scan should not escape the TargetedStates range.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Tooling/Syntax/Pseudo/LRTable.cpp | ||
---|---|---|
114–115 | I think this check is no longer needed |
I'm seeing debug failures again on Windows after this.
FAIL: Clang :: Syntax/lr-build-conflicts.test (14728 of 14729) ******************** TEST 'Clang :: Syntax/lr-build-conflicts.test' FAILED ******************** Script: -- : 'RUN: at line 5'; clang-pseudo -grammar F:\source\llvm-project\clang\test\Syntax\lr-build-conflicts.test -print-graph | f:\source\llvm-project\llvm\out\build\x64-debug\bin\filecheck.exe F:\source\llvm-project\clang\test\Syntax\lr-build-conflicts.test --check-prefix=GRAPH : 'RUN: at line 30'; clang-pseudo -grammar F:\source\llvm-project\clang\test\Syntax\lr-build-conflicts.test -print-table | f:\source\llvm-project\llvm\out\build\x64-debug\bin\filecheck.exe F:\source\llvm-project\clang\test\Syntax\lr-build-conflicts.test --check-prefix=TABLE -- Exit Code: 2 Command Output (stdout): -- $ ":" "RUN: at line 5" $ "clang-pseudo" "-grammar" "F:\source\llvm-project\clang\test\Syntax\lr-build-conflicts.test" "-print-graph" $ "f:\source\llvm-project\llvm\out\build\x64-debug\bin\filecheck.exe" "F:\source\llvm-project\clang\test\Syntax\lr-build-conflicts.test" "--check-prefix=GRAPH" $ ":" "RUN: at line 30" $ "clang-pseudo" "-grammar" "F:\source\llvm-project\clang\test\Syntax\lr-build-conflicts.test" "-print-table" note: command had no output on stdout or stderr error: command failed with exit status: 3221226505 $ "f:\source\llvm-project\llvm\out\build\x64-debug\bin\filecheck.exe" "F:\source\llvm-project\clang\test\Syntax\lr-build-conflicts.test" "--check-prefix=TABLE" # command stderr: FileCheck error: '<stdin>' is empty. FileCheck command line: f:\source\llvm-project\llvm\out\build\x64-debug\bin\filecheck.exe F:\source\llvm-project\clang\test\Syntax\lr-build-conflicts.test --check-prefix=TABLE error: command failed with exit status: 2 -- ******************** Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. FAIL: Clang :: Syntax/lr-build-basic.test (14729 of 14729) ******************** TEST 'Clang :: Syntax/lr-build-basic.test' FAILED ******************** Script: -- : 'RUN: at line 5'; clang-pseudo -grammar F:\source\llvm-project\clang\test\Syntax\lr-build-basic.test -print-graph | f:\source\llvm-project\llvm\out\build\x64-debug\bin\filecheck.exe F:\source\llvm-project\clang\test\Syntax\lr-build-basic.test --check-prefix=GRAPH : 'RUN: at line 18'; clang-pseudo -grammar F:\source\llvm-project\clang\test\Syntax\lr-build-basic.test -print-table | f:\source\llvm-project\llvm\out\build\x64-debug\bin\filecheck.exe F:\source\llvm-project\clang\test\Syntax\lr-build-basic.test --check-prefix=TABLE -- Exit Code: 2 Command Output (stdout): -- $ ":" "RUN: at line 5" $ "clang-pseudo" "-grammar" "F:\source\llvm-project\clang\test\Syntax\lr-build-basic.test" "-print-graph" $ "f:\source\llvm-project\llvm\out\build\x64-debug\bin\filecheck.exe" "F:\source\llvm-project\clang\test\Syntax\lr-build-basic.test" "--check-prefix=GRAPH" $ ":" "RUN: at line 18" $ "clang-pseudo" "-grammar" "F:\source\llvm-project\clang\test\Syntax\lr-build-basic.test" "-print-table" note: command had no output on stdout or stderr error: command failed with exit status: 3221226505 $ "f:\source\llvm-project\llvm\out\build\x64-debug\bin\filecheck.exe" "F:\source\llvm-project\clang\test\Syntax\lr-build-basic.test" "--check-prefix=TABLE" # command stderr: FileCheck error: '<stdin>' is empty. FileCheck command line: f:\source\llvm-project\llvm\out\build\x64-debug\bin\filecheck.exe F:\source\llvm-project\clang\test\Syntax\lr-build-basic.test --check-prefix=TABLE error: command failed with exit status: 2 -- ******************** Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. ******************** Failed Tests (2): Clang :: Syntax/lr-build-basic.test Clang :: Syntax/lr-build-conflicts.test Testing Time: 336.94s Unsupported : 1727 Passed : 12972 Expectedly Failed: 28 Failed : 2
It looks to be another index out of bounds assert with the MSVC STL debug iterators. Can you fix or revert?
Fixed in 28ccf326725d0fea8648834c8acdbdfe3aa40d7a.
clang/lib/Tooling/Syntax/Pseudo/LRTable.cpp | ||
---|---|---|
114–115 | sorry, should have thought more carefully on this comment, we need this check to make sure we don't access Actions[Actions.end()] on Line120 below. |
clang/lib/Tooling/Syntax/Pseudo/LRTable.cpp | ||
---|---|---|
114–115 | Sorry about that. You're right, we formally do &*Actions[Actions.size()], which is invalid. However we don't actually need a runtime check, just a change of syntax to avoid the dereference: return llvm::makeArrayRef(Actions.data() + (Start - States.data()), End - Start); |
I think this check is no longer needed