* at sizeof(ucontext_t).
  */
 static __always_inline bool get_current_context(struct tdescr *td,
-                                               ucontext_t *dest_uc)
+                                               ucontext_t *dest_uc,
+                                               size_t dest_sz)
 {
        static volatile bool seen_already;
 
        /* it's a genuine invocation..reinit */
        seen_already = 0;
        td->live_uc_valid = 0;
-       td->live_sz = sizeof(*dest_uc);
+       td->live_sz = dest_sz;
        memset(dest_uc, 0x00, td->live_sz);
        td->live_uc = dest_uc;
        /*
 
        struct _aarch64_ctx *shead = GET_SF_RESV_HEAD(sf), *head;
 
        /* just to fill the ucontext_t with something real */
-       if (!get_current_context(td, &sf.uc))
+       if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
                return 1;
 
        /* need at least 2*HDR_SZ space: KSFT_BAD_MAGIC + terminator. */
 
        struct _aarch64_ctx *shead = GET_SF_RESV_HEAD(sf), *head;
 
        /* just to fill the ucontext_t with something real */
-       if (!get_current_context(td, &sf.uc))
+       if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
                return 1;
 
        resv_sz = GET_SF_RESV_SIZE(sf);
 
        struct _aarch64_ctx *shead = GET_SF_RESV_HEAD(sf), *head;
 
        /* just to fill the ucontext_t with something real */
-       if (!get_current_context(td, &sf.uc))
+       if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
                return 1;
 
        /* at least HDR_SZ for the badly sized terminator. */
 
        struct _aarch64_ctx *shead = GET_SF_RESV_HEAD(sf), *head;
 
        /* just to fill the ucontext_t with something real */
-       if (!get_current_context(td, &sf.uc))
+       if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
                return 1;
 
        head = get_starting_head(shead, sizeof(struct fpsimd_context) + HDR_SZ,
 
                                         siginfo_t *si, ucontext_t *uc)
 {
        /* just to fill the ucontext_t with something real */
-       if (!get_current_context(td, &sf.uc))
+       if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
                return 1;
 
        /* Forcing sigframe on misaligned SP (16 + 3) */
 
        struct _aarch64_ctx *head = GET_SF_RESV_HEAD(sf);
 
        /* just to fill the ucontext_t with something real */
-       if (!get_current_context(td, &sf.uc))
+       if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
                return 1;
 
        resv_sz = GET_SF_RESV_SIZE(sf);
 
        struct sve_context *sve;
 
        /* Get a signal context with a SME ZA frame in it */
-       if (!get_current_context(td, &sf.uc))
+       if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
                return 1;
 
        resv_sz = GET_SF_RESV_SIZE(sf);
 
        struct sve_context *sve;
 
        /* Get a signal context with a SVE frame in it */
-       if (!get_current_context(td, &sf.uc))
+       if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
                return 1;
 
        resv_sz = GET_SF_RESV_SIZE(sf);
 
        struct za_context *za;
 
        /* Get a signal context which should have a ZA frame in it */
-       if (!get_current_context(td, &sf.uc))
+       if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
                return 1;
 
        resv_sz = GET_SF_RESV_SIZE(sf);
 
         * in it.
         */
        setup_ssve_regs();
-       if (!get_current_context(td, &sf.uc))
+       if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
                return 1;
 
        resv_sz = GET_SF_RESV_SIZE(sf);
 
         * in it.
         */
        setup_sve_regs();
-       if (!get_current_context(td, &sf.uc))
+       if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
                return 1;
 
        resv_sz = GET_SF_RESV_SIZE(sf);
 
        struct sve_context *sve;
 
        /* Get a signal context which should have a SVE frame in it */
-       if (!get_current_context(td, &sf.uc))
+       if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
                return 1;
 
        resv_sz = GET_SF_RESV_SIZE(sf);
 
         * in it.
         */
        setup_za_regs();
-       if (!get_current_context(td, &sf.uc))
+       if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
                return 1;
 
        resv_sz = GET_SF_RESV_SIZE(sf);