aboutsummaryrefslogtreecommitdiffstats
path: root/liblll
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-09-19 20:13:42 +0800
committerchriseth <chris@ethereum.org>2018-11-13 20:47:29 +0800
commitc320a650f940fe96108c4c4687313ef26a33e248 (patch)
tree18375b6aec757cf4d30426db642a495333ce04a6 /liblll
parent82fadfd1a7c5715595ddbf6643ae494cdb6eca8c (diff)
downloaddexon-solidity-c320a650f940fe96108c4c4687313ef26a33e248.tar.gz
dexon-solidity-c320a650f940fe96108c4c4687313ef26a33e248.tar.zst
dexon-solidity-c320a650f940fe96108c4c4687313ef26a33e248.zip
LLL: terminate sequences with a STOP
Diffstat (limited to 'liblll')
-rw-r--r--liblll/CodeFragment.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp
index 85480119..60dd0917 100644
--- a/liblll/CodeFragment.cpp
+++ b/liblll/CodeFragment.cpp
@@ -45,6 +45,10 @@ using namespace dev::lll;
void CodeFragment::finalise(CompilerState const& _cs)
{
+ // NOTE: add this as a safeguard in case the user didn't issue an
+ // explicit stop at the end of the sequence
+ m_asm.append(Instruction::STOP);
+
if (_cs.usedAlloc && _cs.vars.size() && !m_finalised)
{
m_finalised = true;