GP-5221 handle relative paths in dwarf source info

This commit is contained in:
James 2025-01-06 16:54:41 -05:00
parent 860c754484
commit 60a7d049b1
5 changed files with 274 additions and 69 deletions

View file

@ -104,6 +104,9 @@ public final class SourceFile implements Comparable<SourceFile> {
throw new IllegalArgumentException(
"SourceFile URI must represent a file (not a directory)");
}
if (path.startsWith("/../")) {
throw new IllegalArgumentException("path must be absolute after normalization");
}
}
catch (URISyntaxException e) {
throw new IllegalArgumentException("path not valid: " + e.getMessage());