summary refs log tree commit diff stats
path: root/compiler/semtempl.nim
diff options
context:
space:
mode:
authorAntonis Geralis <43617260+planetis-m@users.noreply.github.com>2022-09-05 09:26:02 +0300
committerGitHub <noreply@github.com>2022-09-05 08:26:02 +0200
commit8dcf367e5223ae26b57c9bbfaec6e70ac14bb820 (patch)
tree66bb46ead56039a37fbaf312befbba59c32f8320 /compiler/semtempl.nim
parentcde6b2aab8f67291eca5375a067f97e98b7593ee (diff)
downloadNim-8dcf367e5223ae26b57c9bbfaec6e70ac14bb820.tar.gz
Prevent use-after-free bugs in object variants. Fixes bug #20305 (#20300) [backport]
prevent use-after-free bugs in cased objects

the bug happens specifically when deleting
an item in a seq. The item taking it's place
might not have the same case fields. Then =sink(x[i], move x[xl])
might leave the deleted fields still in memory!
If the new item switches branches again, you get a use-after-free bug.
Diffstat (limited to 'compiler/semtempl.nim')
0 files changed, 0 insertions, 0 deletions