summaryrefslogtreecommitdiffhomepage
path: root/eval.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-10-15 18:13:51 +0200
committerJo-Philipp Wich <jo@mein.io>2020-10-15 18:47:39 +0200
commit6bbc6137d2bc0ec79e740ea50e6edee0496bcf85 (patch)
treecd61c61242b83000bbe34d1c14bf52fd9edd2318 /eval.h
parentbbeeb113926ba117791f67d49487edb908bf8893 (diff)
eval: fix potential segfault in for() loops
When a for() loop body, initializer, test or increment expression compiles further code, e.g. by invoking invoke() or require(), the opcode pool will be reallocated, potentially changing the addresses of all opcodes. This might lead to an invalid memory access when previously cached opcode pointers are accessed later on. Solve this issue by obtaining the relative offsets of the corresponding opcodes, avoiding the need for pointer dereferences. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'eval.h')
0 files changed, 0 insertions, 0 deletions