commit | fa1ab61698624253c378519b576956e4ac86341a | [log] [tgz] |
---|---|---|
author | Ian Zerny <zerny@google.com> | Fri Nov 03 10:28:30 2023 +0100 |
committer | Ian Zerny <zerny@google.com> | Fri Nov 03 10:28:30 2023 +0100 |
tree | 063fe744792737a64af0dff87706afc3b9384dc4 | |
parent | 2f0a434902bd18f625bb3b5f284fbd36c4acdcd5 [diff] |
Guard against no-line info in kotlin source debug extensions Bug: b/308902848 Change-Id: I4e33ad34416c8eaaeffb427fc401378e2098a7d7
diff --git a/src/main/java/com/android/tools/r8/utils/positions/PositionRemapper.java b/src/main/java/com/android/tools/r8/utils/positions/PositionRemapper.java index 4026dc3..e769917 100644 --- a/src/main/java/com/android/tools/r8/utils/positions/PositionRemapper.java +++ b/src/main/java/com/android/tools/r8/utils/positions/PositionRemapper.java
@@ -169,11 +169,8 @@ parsedData.lookupCalleePosition(line); if (calleePosition != null) { // Take the first line as the callee position - position = - position - .builderWithCopy() - .setLine(calleePosition.getValue().getRange().from) - .build(); + int calleeLine = Math.max(0, calleePosition.getValue().getRange().from); + position = position.builderWithCopy().setLine(calleeLine).build(); } return baseRemapper.createRemappedPosition( SourcePosition.builder()