guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 03/07: Fix zeroing of literal pool entries


From: Andy Wingo
Subject: [Guile-commits] 03/07: Fix zeroing of literal pool entries
Date: Fri, 19 Jun 2020 10:32:52 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit 97212e87bdcd9f9cff54aa979a48ce73535a0e88
Author: Andy Wingo <wingo@igalia.com>
AuthorDate: Fri Jun 19 16:22:31 2020 +0200

    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!
---
 lightening/lightening.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lightening/lightening.c b/lightening/lightening.c
index ca5708f..62f1e9d 100644
--- a/lightening/lightening.c
+++ b/lightening/lightening.c
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]