Skip to content

[AIPROFVIS-703] Report a malformed compare_files list in a project as a load error instead of crashing - #1211

Open
dhingora-amd wants to merge 2 commits into
mainfrom
dhingora/fix-rpv-compare-files
Open

dhingora-amd wants to merge 2 commits into
mainfrom
dhingora/fix-rpv-compare-files

Conversation

@dhingora-amd

Copy link
Copy Markdown
Contributor

Motivation

Opening a .rpv project whose compare_files list held a non-string entry (for example "compare_files": [1, 2] from a hand edit or a merge conflict) aborted the whole app. The open loop called jt::Json::getString() on each entry without checking its type, and the jt getters abort() on a type mismatch.

Technical Details

  • Project::JsonValidForLoad now rejects a project if any compare_files entry is not a string, so OpenProject fails with the existing "The project file is invalid or corrupted" message before it reads the entries.
  • The check runs in every build. In builds without ROCPROFVIS_ENABLE_TRACE_COMPARE, a malformed list now gets the corrupted-project message instead of "not available in this build".
  • Testing:
    • New UI test sys_project_malformed_compare_files_error opens a .rpv with "compare_files": [1, 2] and expects a failed load with the corrupted-project message.
    • Before the fix, the UI test run aborted with SIGABRT at this test. With the fix, it passes on both sample traces.
    • Built with ROCPROFVIS_ENABLE_TRACE_COMPARE=ON and ROCPROFVIS_ENABLE_UI_TESTS=ON.

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Security scan found no critical or high findings on lines changed by this pull request

View the security scan run for complete reports.

“New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta.

…are-files

# Conflicts:
#	src/app/test/app_tests.cpp

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants