Skip to content

fix: validate plot_congestion.py CLI arguments#4074

Open
mithlohar144 wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
mithlohar144:fix/plot-congestion-arg-validation
Open

fix: validate plot_congestion.py CLI arguments#4074
mithlohar144 wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
mithlohar144:fix/plot-congestion-arg-validation

Conversation

@mithlohar144
Copy link
Copy Markdown

This PR fixes a small CLI robustness issue in plot_congestion.py.

Problem:

The script accessed positional arguments directly and crashed with IndexError when invoked with too few arguments.
The script also accepted malformed trailing args (odd count) that should be rejected.

@mithlohar144 mithlohar144 force-pushed the fix/plot-congestion-arg-validation branch from 621cd56 to 0a28d28 Compare March 30, 2026 04:28
Signed-off-by: Mithilesh Lohar <128236295+mithlohar144@users.noreply.github.com>
Copy link
Copy Markdown
Member

@maliberty maliberty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oharboe is this file even in use?

@maliberty
Copy link
Copy Markdown
Member

Needs to be formatted with black

@oharboe
Copy link
Copy Markdown
Collaborator

oharboe commented Mar 30, 2026

@oharboe is this file even in use?

Not by me.

@maliberty
Copy link
Copy Markdown
Member

@oharboe you created this and a number of other scripts in #2735. Can we remove all that?

@oharboe
Copy link
Copy Markdown
Collaborator

oharboe commented Mar 30, 2026

@oharboe you created this and a number of other scripts in #2735. Can we remove all that?

I have cleanup PRs that I will line up, so perhaps you prefer to wait?

@mithlohar144 mithlohar144 force-pushed the fix/plot-congestion-arg-validation branch from 1267eaa to e607af3 Compare March 30, 2026 15:37
Signed-off-by: Mithilesh Lohar <128236295+mithlohar144@users.noreply.github.com>
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.

3 participants