Skip to content

[integration] validate compilation database paths after unescaping - #2328

Merged
dulmarod merged 1 commit into
meta:mainfrom
VladimirMakaev:clangdb-validate-unescaped-paths
Nov 25, 2026
Merged

dulmarod merged 1 commit into
meta:mainfrom
VladimirMakaev:clangdb-validate-unescaped-paths

Conversation

@VladimirMakaev

Copy link
Copy Markdown
Contributor

An empty escaped filename produces no printf output. Reading a first line raised End_of_file
instead of reporting invalid compilation-database input:

[{"directory":"/tmp","file":"","arguments":["clang","-c","example.c"]}]

Read the complete output, reject empty directory/file fields with a format error, and report failed
shell unescaping through the same diagnostic path. Keep non-string validation and valid capture.
Do not skip invalid entries or report a partially captured database as successful.

Fixes #1960.

Test plan

Regression script checks raw/escaped empty, null and non-string paths, malformed escaping and
valid space-containing paths. Valid entries retain their null-dereference report. Full suite.

An empty escaped filename produces no printf output. Reading a first line raised End_of_file
instead of reporting invalid compilation-database input:

```json
[{"directory":"/tmp","file":"","arguments":["clang","-c","example.c"]}]
```

Read the complete output, reject empty directory/file fields with a format error, and report failed
shell unescaping through the same diagnostic path. Keep non-string validation and valid capture.
Do not skip invalid entries or report a partially captured database as successful.

Fixes meta#1960.

## Test plan
Regression script checks raw/escaped empty, null and non-string paths, malformed escaping and
valid space-containing paths. Valid entries retain their null-dereference report. Full suite.
@meta-cla meta-cla Bot added the CLA Signed label Nov 24, 2026
@dulmarod
dulmarod merged commit 3149771 into meta:main Nov 25, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Errors when handling xcodebuild in compile_commands.json

2 participants