Skip to content

Genreport variable bug#4035

Merged
maliberty merged 1 commit intoThe-OpenROAD-Project:masterfrom
Vi-shub:genreport-variable-bug
Mar 24, 2026
Merged

Genreport variable bug#4035
maliberty merged 1 commit intoThe-OpenROAD-Project:masterfrom
Vi-shub:genreport-variable-bug

Conversation

@Vi-shub
Copy link
Contributor

@Vi-shub Vi-shub commented Mar 22, 2026

closes #4033

This PR fixes a logic bug in flow/util/genReport.py.
In gen_report(name, data) on line 173, the code incorrectly referenced the global loop variable d["drcs"] instead of the function parameter data["drcs"].
While this did not break the current flow because the global d from the main loop happened to mirror data, it broke function encapsulation and would silent-fail if gen_report() was ever called outside of that specific loop iteration. This PR changes it to properly evaluate its passed argument.

@luarss @maliberty can you please review this. It is small typo error but needs to be correct the functionality.
Thanks for you time :)

chmod +x /usr/local/bin/wrapped-cc/g++
# Add compiler wrapper scripts for reproducible builds
COPY --link etc/setup_compiler_wrappers.sh /tmp/
RUN sh /tmp/setup_compiler_wrappers.sh && rm /tmp/setup_compiler_wrappers.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this diff inside this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ohh I see, it is the Git mix up :) I thought I was on main branch but accidentally pushes changes from feature. I'll correct it and push it again. Thankyou for you time.

chmod +x /usr/local/bin/wrapped-cc/g++
# add compiler wrapper scripts for reproducible builds
COPY setup_compiler_wrappers.sh /tmp/
RUN sh /tmp/setup_compiler_wrappers.sh && rm /tmp/setup_compiler_wrappers.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

same

cat > "$WRAPPER_DIR/gcc" << 'WRAPPER'
#!/bin/sh
exec /usr/bin/gcc -D__TIME__="\"0\"" -D__DATE__="\"0\"" -D__TIMESTAMP__="\"0\"" -Wno-builtin-macro-redefined "$@"
WRAPPER
Copy link
Contributor

Choose a reason for hiding this comment

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

same

- gen_report() in flow/util/genReport.py incorrectly referenced the global iteration variable 'd' instead of the function parameter 'data' on line 173.
- Changed d['drcs'] to data['drcs'] to fix the logic bug.

Signed-off-by: Vi-shub <[email protected]>
@Vi-shub Vi-shub force-pushed the genreport-variable-bug branch from aae4641 to 9d36f7e Compare March 23, 2026 05:20
@luarss luarss requested a review from maliberty March 23, 2026 05:24
@Vi-shub
Copy link
Contributor Author

Vi-shub commented Mar 23, 2026

Hi @maliberty can you review this. Thanks for you time, happy to work with you.

@maliberty maliberty enabled auto-merge March 24, 2026 00:03
@maliberty maliberty merged commit 65552ef into The-OpenROAD-Project:master Mar 24, 2026
8 of 9 checks passed
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.

[Bug] gen_report() incorrectly uses global variable d instead of parameter data

3 participants