Doesn't happen on vared of an existing param, as far as I can tell. ==1443300== Conditional jump or move depends on uninitialised value(s) ==1443300== at 0x2612D1: zleread (zle_main.c:1353) ==1443300== by 0x263333: bin_vared (zle_main.c:1833) ==1443300== by 0x12AB3C: execbuiltin (builtin.c:506) ==1443300== by 0x155B3E: execcmd_exec (exec.c:4187) ==1443300== by 0x14F2C6: execpline2 (exec.c:2003) ==1443300== by 0x14DE4D: execpline (exec.c:1728) ==1443300== by 0x14D0B7: execlist (exec.c:1482) ==1443300== by 0x14C6E5: execode (exec.c:1263) ==1443300== by 0x17419D: loop (init.c:212) ==1443300== by 0x178D12: zsh_main (init.c:1810) ==1443300== by 0x129BCC: main (main.c:93) 1352 1353 if (zleline && *zleline) 1354 redrawhook(); 1355
(I was not able to follow workers these days, and am now trying to catch up with it...slowly) > 2023/02/26 7:31, Bart Schaefer <schaefer@brasslantern.com> wrote: > > Doesn't happen on vared of an existing param, as far as I can tell. > > ==1443300== Conditional jump or move depends on uninitialised value(s) > ==1443300== at 0x2612D1: zleread (zle_main.c:1353) > ==1443300== by 0x263333: bin_vared (zle_main.c:1833) (snip) > 1353 if (zleline && *zleline) > 1354 redrawhook(); It seems *zleline is not set correctly when zleline is empty. Please try the following: diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c index 454a877a9..51bb43339 100644 --- a/Src/Zle/zle_utils.c +++ b/Src/Zle/zle_utils.c @@ -512,12 +512,13 @@ stringaszleline(char *instr, int incs, int *outll, int *outsz, int *outcs) *outcs = outptr - outstr; *outll = outptr - outstr; } else { + *outstr = ZWC('\0'); *outll = 0; if (outcs) *outcs = 0; } #else - memcpy(outstr, instr, ll); + strcpy(outstr, instr); *outll = ll; if (outcs) *outcs = incs;
> 2023/03/23 18:03, I wrote:
>
> It seems *zleline is not set correctly when zleline is empty.
> Please try the following:
>
>
> diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c
(snip)
Has anyone tested this patch? Is it OK to push this?
On Fri, Mar 31, 2023 at 1:21 AM Jun T <takimoto-j@kba.biglobe.ne.jp> wrote:
>
> Has anyone tested this patch? Is it OK to push this?
I've been traveling the last 2 weeks so more disengaged than recently.
The patch seems fine, yes it may be pushed.