Skip to content

Commit

Permalink
use largestAccessedSize for size of regions from DSA cells
Browse files Browse the repository at this point in the history
  • Loading branch information
l-kent committed Dec 2, 2024
1 parent b55ca98 commit 470f4b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/analysis/RegionInjector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class RegionInjectorDSA(override val program: Program, DSATopDown: mutable.Map[P
if (mergedRegions.contains(cell)) {
program.initialMemoryLookup(range.start) match {
case Some(section) =>
val size = (range.end - range.start).toInt
val size = cell.largestAccessedSize
val bytes = section.getBytes(range.start, size)
// should probably check that region is entirely contained within section but shouldn't happen in practice?
val newSection = MemorySection(mergedRegions(cell).name, range.start, size, bytes, section.readOnly, Some(mergedRegions(cell)))
Expand Down

0 comments on commit 470f4b2

Please sign in to comment.