1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00

Fix zeroing of literal pool entries

* lightening/lightening.c (reset_literal_pool): Zero before setting size
  to 0.  Thanks to Dale Smith for pointing this out!
This commit is contained in:
Andy Wingo 2020-06-19 16:22:31 +02:00
parent ffba9b08c4
commit 97212e87bd

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2012-2019 Free Software Foundation, Inc.
* Copyright (C) 2012-2020 Free Software Foundation, Inc.
*
* This file is part of GNU lightning.
*
@ -1238,8 +1238,8 @@ static void
reset_literal_pool(jit_state_t *_jit, struct jit_literal_pool *pool)
{
pool->deadline = _jit->limit - _jit->start;
pool->size = 0;
memset(pool->entries, 0, sizeof(pool->entries[0]) * pool->size);
pool->size = 0;
}
#define INITIAL_LITERAL_POOL_CAPACITY 12