This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=7ecc6ad0be8c9ec957fb6f7cbe1ddff08d53a0e0

commit 7ecc6ad0be8c9ec957fb6f7cbe1ddff08d53a0e0
Author: Guillem Jover <[email protected]>
AuthorDate: Wed Jul 24 15:57:06 2024 +0200

    test: Mark variables around longjmp() as volatile
    
    The longjmp() function might change CPU registers, and if the compiler
    assumes it can take the values for these local variables directly from
    the registers, they might end up being wrong.
---
 lib/dpkg/t/t-varbuf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/dpkg/t/t-varbuf.c b/lib/dpkg/t/t-varbuf.c
index 569dd6421..67af373d9 100644
--- a/lib/dpkg/t/t-varbuf.c
+++ b/lib/dpkg/t/t-varbuf.c
@@ -85,8 +85,8 @@ test_varbuf_grow(void)
 {
        struct varbuf vb;
        jmp_buf grow_jump;
-       size_t old_size;
-       bool grow_overflow;
+       volatile size_t old_size;
+       volatile bool grow_overflow;
        int i;
 
        varbuf_init(&vb, 10);

-- 
Dpkg.Org's dpkg

Reply via email to