[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 02/09: set size to known value before init
From: |
Andy Wingo |
Subject: |
[Guile-commits] 02/09: set size to known value before init |
Date: |
Mon, 22 Apr 2024 09:21:39 -0400 (EDT) |
wingo pushed a commit to branch main
in repository guile.
commit 3f495cc5d641603547eda205d38d9227186d5bdb
Author: Luke Nihlen <luke.nihlen@gmail.com>
AuthorDate: Tue Jan 11 09:02:30 2022 -0500
set size to known value before init
---
lightening/lightening.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lightening/lightening.c b/lightening/lightening.c
index ebd857848..1254514ae 100644
--- a/lightening/lightening.c
+++ b/lightening/lightening.c
@@ -1328,7 +1328,7 @@ static void
reset_literal_pool(jit_state_t *_jit, struct jit_literal_pool *pool)
{
pool->deadline = _jit->limit - _jit->start;
- memset(pool->entries, 0, sizeof(pool->entries[0]) * pool->capacity);
+ memset(pool->entries, 0, sizeof(pool->entries[0]) * pool->size);
pool->size = 0;
}
@@ -1343,6 +1343,7 @@ alloc_literal_pool(jit_state_t *_jit, size_t capacity)
sizeof (struct jit_literal_pool_entry) * capacity);
ASSERT (ret);
ret->capacity = capacity;
+ ret->size = 0;
reset_literal_pool(_jit, ret);
return ret;
}
- [Guile-commits] branch main updated (112b617f5 -> e2fad2025), Andy Wingo, 2024/04/22
- [Guile-commits] 03/09: Merge branch 'topic/fix-reset-literal-pool' into 'main', Andy Wingo, 2024/04/22
- [Guile-commits] 01/09: replace use of uninitialized variable size in reset_literal_pool, Andy Wingo, 2024/04/22
- [Guile-commits] 08/09: Fix compilation when SCM_I_PTHREAD_ONCE_INIT is not aggregate, Andy Wingo, 2024/04/22
- [Guile-commits] 05/09: aarch64: Fix swap_atomic retry, Andy Wingo, 2024/04/22
- [Guile-commits] 09/09: Merge Lightening update branch, Andy Wingo, 2024/04/22
- [Guile-commits] 06/09: aarch64: Add support for LSE atomics, Andy Wingo, 2024/04/22
- [Guile-commits] 04/09: Fix CI, Andy Wingo, 2024/04/22
- [Guile-commits] 02/09: set size to known value before init,
Andy Wingo <=
- [Guile-commits] 07/09: Merge remote-tracking branch 'lightening/main', Andy Wingo, 2024/04/22