Skip to content

Commit

Permalink
[dwarf] Fix crash if subprogram is null
Browse files Browse the repository at this point in the history
  • Loading branch information
titzer committed Jan 20, 2025
1 parent 84674ec commit aa65ba1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 2 additions & 0 deletions aeneas/src/debug/Dwarf.v3
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class Dwarf {
}
// Update non-ssa var location.
def updateVarLoc(index: int, locs: Array<(X86_64Reg, int)>, pos: int) {
if (context.method.subprogram == null) return; // TODO: no variable map
index = context.method.subprogram.loclistMap.get(index) - 1;
if (index < 0) return; // TODO: variable not found, probably a missing new var
var lists = loclists.locLists;
Expand All @@ -141,6 +142,7 @@ class Dwarf {
}
// Delete {n} number of variables. Add Dwarf lexical block to mark the scope of variable.
def deleteVar(n: int, pos: int) {
if (context.method.subprogram == null) return; // TODO: no variable map
var code = abbrev.getAbbrev(DwarfAbbrevTag.LexicalBlock);
var children = context.method.subprogram.children, childLen = children.length;
var i = 0, j = childLen;
Expand Down
2 changes: 1 addition & 1 deletion aeneas/src/main/Version.v3
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

// Updated by VCS scripts. DO NOT EDIT.
component Version {
def version: string = "III-7.1785";
def version: string = "III-7.1786";
var buildData: string;
}
11 changes: 4 additions & 7 deletions doc/aeneas-issues.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ ______ ______ __ _ ______ ______ ______ _____ ______ ______ _ _ ______ _
| | |_____ | \_| |_____ | | _____| __|__ _____| _____| |____| |_____ _____|

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

-- next rev -------------
fix LSRA for critical edge cases
Set -shadow-stack-size=128k for wasm targets
wasi target
stable wasm-linux or wasm-wave target
wave/linux implementation
Expand Down Expand Up @@ -46,7 +43,6 @@ ______ ______ __ _ ______ ______ ______ _____ ______ ______ _ _ ______ _
encoding of struct, array, func types

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

0 comments on commit aa65ba1

Please sign in to comment.