diff options
author | Ayke van Laethem <[email protected]> | 2021-07-15 18:23:35 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-11-02 22:16:15 +0100 |
commit | 1869efe9546308f624ab1110137a5670ca9f515b (patch) | |
tree | 43d1bbb02c3697da6eaa29c7565282ec7bcc015f /interp/interp_test.go | |
parent | 54dd75f7b3d8e87ee405796242898249575a970e (diff) | |
download | tinygo-1869efe9546308f624ab1110137a5670ca9f515b.tar.gz tinygo-1869efe9546308f624ab1110137a5670ca9f515b.zip |
interp: use object layout information for LLVM types
This commit will use the memory layout information for heap allocations
added in the previous commit to determine LLVM types, instead of
guessing their types based on the content. This fixes a bug in which
recursive data structures (such as doubly linked lists) would result in
a compiler stack overflow due to infinite recursion.
Not all heap allocations have a memory layout yet, but this can be
incrementally fixed in the future. So far, this commit should fix
(almost?) all cases of this stack overflow issue.
Diffstat (limited to 'interp/interp_test.go')
-rw-r--r-- | interp/interp_test.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/interp/interp_test.go b/interp/interp_test.go index 9080de899..516fdd119 100644 --- a/interp/interp_test.go +++ b/interp/interp_test.go @@ -17,6 +17,7 @@ func TestInterp(t *testing.T) { "consteval", "interface", "revert", + "alloc", } { name := name // make tc local to this closure t.Run(name, func(t *testing.T) { |