aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-09-20 17:48:24 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-09-20 17:48:24 -0400
commit257fded70cc456f0c4c2a56f845cf7f21e738674 (patch)
treebb2ab8d0f241b7c37ef2d99ff5b798dde4edfa48 /src/analyze.cpp
parentf663bcd6b2ff8186e13b6826318fa3c8e72a9ff9 (diff)
downloadzig-257fded70cc456f0c4c2a56f845cf7f21e738674.tar.gz
zig-257fded70cc456f0c4c2a56f845cf7f21e738674.zip
avoid setting `tail` for `@panic`
Currently, slices are passed via reference, even though it would be better to pass the ptr and len as separate arguments (#561). This means that any function call with a slice parameter cannot be a tail call, because according to LLVM spec: > Both [tail,musttail] markers imply that the callee does not access > allocas from the caller There was one other place we were setting `tail` and I made that conditional on whether or not the argument referenced allocas in the caller. This was causing undefined behavior in the compiler when it hit asserts, causing it to print garbage memory to the terminal. See #3262 for example.
Diffstat (limited to 'src/analyze.cpp')
0 files changed, 0 insertions, 0 deletions