You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the provided PDN width/pitch are too large, calling RamGen::ramPdngen() can result in a segfault.
The pitch and width parameters should be checked to make sure that they are not larger than the die size. Otherwise, error.
There may be error checking already done in the PDN module which we aren't calling. Or the error checking might be in Tcl so we are circumventing it by calling it in C++. There may be some slight code duplication but ram needs to not segfault.
@gadfort Hi, so I ran into this while working on implementing column/mux support where if you set a ratio value that causes the RAM to be smaller than the provided PDN width/pitch it will result in a segmentation fault. You can get a similar result by creating a RAM that is small enough. For example if you create a 4x8 RAM using:
It will run succesfully without error. I have a fix that checks the die dimension against the size of the width and pitch and gives an error instead of outputing the segmentation fault at the top of the ramPdngen() function that I'll open a PR for.
@tnguy19 thanks, let's let @gadfort take a look at it first to determine whether it's something that should be fixed in pdn or something that should be fixed in ram.
@tnguy19 the issue here is that PDN is assuming the tracks have been created (which they have not), so it blindly accesses the grid but it's a nullptr.
Activity
gadfort commentedon Mar 26, 2026
@rovinski these checks are handled inside PDN, so it should not be possible to bypass (unless there is a bug in PDN). Can you share a testcase?
rovinski commentedon Mar 26, 2026
@tnguy19 Can you open a PR with the code changes that caused the segfault and point @gadfort to them?
tnguy19 commentedon Mar 26, 2026
@gadfort Hi, so I ran into this while working on implementing column/mux support where if you set a ratio value that causes the RAM to be smaller than the provided PDN width/pitch it will result in a segmentation fault. You can get a similar result by creating a RAM that is small enough. For example if you create a 4x8 RAM using:
You will run into a segmentation fault with the output:
But if you change the command to:
It will run succesfully without error. I have a fix that checks the die dimension against the size of the width and pitch and gives an error instead of outputing the segmentation fault at the top of the
ramPdngen()function that I'll open a PR for.rovinski commentedon Mar 27, 2026
@tnguy19 thanks, let's let @gadfort take a look at it first to determine whether it's something that should be fixed in
pdnor something that should be fixed inram.gadfort commentedon Mar 27, 2026
@tnguy19 the issue here is that PDN is assuming the tracks have been created (which they have not), so it blindly accesses the grid but it's a nullptr.
should be
rovinski commentedon Mar 27, 2026
Thanks!
@tnguy19 can you merge the latest master into your fork and check to make sure that it doesn't segfault anymore (i.e. without your error checking)?
rovinski commentedon Apr 6, 2026
Closed in #9968