diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-10-15 18:13:51 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-10-15 18:47:39 +0200 |
commit | 6bbc6137d2bc0ec79e740ea50e6edee0496bcf85 (patch) | |
tree | cd61c61242b83000bbe34d1c14bf52fd9edd2318 /lib | |
parent | bbeeb113926ba117791f67d49487edb908bf8893 (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 'lib')
0 files changed, 0 insertions, 0 deletions