vscode-codeql
vscode-codeql copied to clipboard
Failure to compare large results
Describe the bug CodeQL fails to "Compare Results"
Version
CodeQL extension version: 1.6.6 CodeQL CLI version: 2.9.2 Platform: win32 x64
Version: 1.67.2 (user setup) Commit: c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5 Date: 2022-05-17T18:15:52.058Z Electron: 17.4.1 Chromium: 98.0.4758.141 Node.js: 16.13.0 V8: 9.8.177.13-electron.0 OS: Windows_NT x64 10.0.19044
To reproduce Get codeql database from https://bug-bounty-codeql-databases.s3.us-east-2.amazonaws.com/codeql-db-100-cpp.tar.xz Query it first for
import cpp
from Variable var
select var
then for
import cpp
from LocalVariable var
select var
In the Query Results window select both rows, right click and "Compare Results"
Observe an error message "Reading bqrs data failed: Error: Cannot create a string longer than 0x1fffffe8 characters"
Expected behavior See the difference between two results
Thank you for reporting this issue. The extension cannot handle comparisons of such large results sets. This is because in order to compare results, we need to load both results sets into memory.
Maybe algorithm can be changed... From the error message it sounds like it tries to create a single huge string.