Skip to content

Commit aa65ba1

Browse files
committed
[dwarf] Fix crash if subprogram is null
1 parent 84674ec commit aa65ba1

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

aeneas/src/debug/Dwarf.v3

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ class Dwarf {
131131
}
132132
// Update non-ssa var location.
133133
def updateVarLoc(index: int, locs: Array<(X86_64Reg, int)>, pos: int) {
134+
if (context.method.subprogram == null) return; // TODO: no variable map
134135
index = context.method.subprogram.loclistMap.get(index) - 1;
135136
if (index < 0) return; // TODO: variable not found, probably a missing new var
136137
var lists = loclists.locLists;
@@ -141,6 +142,7 @@ class Dwarf {
141142
}
142143
// Delete {n} number of variables. Add Dwarf lexical block to mark the scope of variable.
143144
def deleteVar(n: int, pos: int) {
145+
if (context.method.subprogram == null) return; // TODO: no variable map
144146
var code = abbrev.getAbbrev(DwarfAbbrevTag.LexicalBlock);
145147
var children = context.method.subprogram.children, childLen = children.length;
146148
var i = 0, j = childLen;

aeneas/src/main/Version.v3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
// Updated by VCS scripts. DO NOT EDIT.
55
component Version {
6-
def version: string = "III-7.1785";
6+
def version: string = "III-7.1786";
77
var buildData: string;
88
}

doc/aeneas-issues.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@ ______ ______ __ _ ______ ______ ______ _____ ______ ______ _ _ ______ _
33
| | |_____ | \_| |_____ | | _____| __|__ _____| _____| |____| |_____ _____|
44

55
-- stable rev burndown --------
6-
x86-64-darwin stable binary
7-
Set -shadow-stack-size=128k for wasm targets
8-
get GC tests running for wasm targets
9-
fix LSRA for critical edge cases
10-
fix all crashes with -dwarf
116

127
-- next rev -------------
8+
fix LSRA for critical edge cases
9+
Set -shadow-stack-size=128k for wasm targets
1310
wasi target
1411
stable wasm-linux or wasm-wave target
1512
wave/linux implementation
@@ -46,7 +43,6 @@ ______ ______ __ _ ______ ______ ______ _____ ______ ______ _ _ ______ _
4643
encoding of struct, array, func types
4744

4845
-- aeneas sucks -----
49-
Enum.set.view(int) and int.view(Enum.set)
5046
names for synthesized functions (e.g. Class.==, byte.!<int>)
5147
Do in-place specialization and normalization
5248
move IntNormalizer into reachability/norm phase instead of mach lowering
@@ -103,14 +99,15 @@ ______ ______ __ _ ______ ______ ______ _____ ______ ______ _ _ ______ _
10399
move normalization of integers into Reachability/Normalization phase
104100
cache normalizations for tuples in MachProgram
105101
introduce NormGetReturnElem
106-
Insert VariantReplaceNull in VstSsaGen?
107102
better error messages for wrong number of arguments
108103
better error messages for type errors in array literals
109104
error messages for comparing with out-of-range integer literals
110105
generate self-executing JAR (shell script with JAR appended)
111106
debugger: allow fuzzy match of files / line
112107
immutable arrays
113108
-- done -------
109+
* fix all crashes with -dwarf
110+
* get GC tests running for wasm targets
114111
* make SsaInterpreter default
115112
* implement big-endian layouts
116113
* debugger: list files

0 commit comments

Comments
 (0)