ram: add PDN strap pitch vs die size error check in ramPdngen() to prevent segfault#9968
Conversation
…event segfault Signed-off-by: Thinh Nguyen <nguyenthinh19011@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request introduces validation checks in the RamGen::ramPdngen function to ensure that the die dimensions are sufficient for the specified horizontal and vertical strap pitches. Specifically, it adds error logging if the die height is less than the horizontal pitch or if the die width is less than the vertical pitch. I have no feedback to provide as there are no review comments.
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
@rovinski I think this check makes sense even if the tool is no longer segfaulting |
|
Yep, I had the same feedback via email |
Signed-off-by: Thinh Nguyen <nguyenthinh19011@gmail.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
Afterwards mark as ready for review |
Signed-off-by: Thinh Nguyen <nguyenthinh19011@gmail.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
CI failure unrelated |
|
Ready for review @gadfort @maliberty |
Co-authored-by: Matt Liberty <matt.liberty@gmail.com> Signed-off-by: Thinh Nguyen <114105118+tnguy19@users.noreply.github.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Summary
When the die area is smaller than the PDN strap pitch, calling RamGen::ramPdngen() can result in a segfault. This adds a check at the top of ramPdngen() to compare die dimensions against the strap pitch and give an error instead
Type of Change
Impact
Instead of a segfault when PDN strap pitch is larger than the die size, user will get a clear error message indicating which dimension is too small and suggesting they use a smaller pitch
Before Fix Sample Error Message:
After Fix Sample Error Message:
Verification
./etc/Build.sh).Related Issues
#9961
@rovinski
@gadfort