Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 5.9 core dumps under zleentry->zleread->zlecore



On Sat, Jun 4, 2022 at 12:39 AM Johan Ström <johan@xxxxxxxxxxx> wrote:
>
> Hm, I had cases where terminals have been on the same virtual desktop,
> with no re-arranging going on at the moment, or since last being used
> (basically only resuming work in existing windows).
> Not sure if SIGWINCH would be sent by just switching virtual desktop (sway).

One reason I'm speculating about this is because of this from your
previous stack trace:

                 #9  0x000055ff7ab040f8 zalloc (zsh + 0x730f8)
                 #10 0x00007fb08a549417 calclist (complete.so + 0x1b417)
                 #11 0x00007fb08a54b040 ilistmatches (complete.so + 0x1d040)

There's only one zalloc() in calclist:

            ws = g->widths = (int *) zalloc(zterm_columns * sizeof(int));

If zterm_columns has somehow become messed up, this might run you out of memory.

Then in the other trace you have:

                 #10 0x000055d4aa005493 zhandler (zsh + 0xa8493)
                 #11 0x00007f2f935388e0 n/a (libc.so.6 + 0x3e8e0)
                 #12 0x00007f2f935fbef2 read (libc.so.6 + 0x101ef2)

That definitely means a signal was received, and SIGWINCH is
explicitly unblocked around that read() call, but it goes straight on
to:

                 #9  0x000055d4a9fc3874 zleentry (zsh + 0x66874)

The only way to get to that from a signal handler is when a
user-defined trap is run:

    /*
     * If zle was running while the trap was executed, see if we
     * need to restore the display.
     */
    if (zleactive && resetneeded)
        zleentry(ZLE_CMD_REFRESH);

However (I suspect) the compiler has optimized out a couple of
intervening function calls, which is why I hope you can get this to
reoccur with a debug build.

> In /etc/zsh, only zprofile:
> https://github.com/archlinux/svntogit-packages/blob/packages/zsh/trunk/zprofile
> Which references this:
> https://github.com/archlinux/svntogit-packages/blob/packages/filesystem/trunk/profile

Yes, which does
  emulate sh -c 'source /etc/profile'
though it seems unlikely that anything too weird is coming in that way.




Messages sorted by: Reverse Date, Date, Thread, Author