Skip to content

Commit

Permalink
Fix OOM in describeNestedSetFingerprint
Browse files Browse the repository at this point in the history
`describedNestedSetFingerprint` appended a `StringBuilder` to itself in a loop instead of the actual item from the nested set, resulting in OOMs in `Runfiles#describeKey` and `RepoMappingManifestAction#describeKey`.

Work towards bazelbuild#18666

Closes bazelbuild#18668.

PiperOrigin-RevId: 540270874
Change-Id: Id408ab4c2438bea264b586f8ae5567dc41260242
  • Loading branch information
fmeum authored and traversaro committed Jun 24, 2023
1 parent 14de260 commit 5272ea6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static <T> String describedNestedSetFingerprint(
sb.append("size: ").append(list.size()).append('\n');
for (T item : list) {
sb.append(" ");
mapFn.expandToCommandLine(item, s -> sb.append(sb).append(", "));
mapFn.expandToCommandLine(item, s -> sb.append(s).append(", "));
sb.append('\n');
}
return sb.toString();
Expand Down

0 comments on commit 5272ea6

Please sign in to comment.