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

[BUG] malloc inside signal handler



Hi everybody,

It seems that setiparam("LINES"/"COLUMNS") inside adjustwinsize() wants
allocate some memory for environment variables.

    #0  0x00007ffff7c5ad22 raise (libc.so.6 + 0x3cd22)
    #1  0x00007ffff7c44862 abort (libc.so.6 + 0x26862)
    #2  0x00007ffff7ca4b08 __malloc_assert (libc.so.6 + 0x86b08)
    #3  0x00007ffff7ca6bf3 sysmalloc (libc.so.6 + 0x88bf3)
    #4  0x00007ffff7ca840e _int_malloc (libc.so.6 + 0x8a40e)
    #5  0x00007ffff7ca9397 malloc (libc.so.6 + 0x8b397)
    #6  0x00005555555ba7fb zalloc (zsh + 0x667fb)
    #7  0x00005555555c29a5 n/a (zsh + 0x6e9a5)
    #8  0x00005555555c4735 addenv (zsh + 0x70735)
    #9  0x00005555555c86cc export_param (zsh + 0x746cc)
    #10 0x00005555555c8b10 n/a (zsh + 0x74b10)
    #11 0x00005555555cb912 setnumvalue (zsh + 0x77912)
    #12 0x00005555555cc59d assignnparam (zsh + 0x7859d)
    #13 0x00005555555f20ba adjustwinsize (zsh + 0x9e0ba)
    #14 0x00005555555e138b zhandler (zsh + 0x8d38b)
    #15 0x00007ffff7c5ada0 __restore_rt (libc.so.6 + 0x3cda0)
    #16 0x00007ffff7ca83ab _int_malloc (libc.so.6 + 0x8a3ab)
    #17 0x00007ffff7ca9397 malloc (libc.so.6 + 0x8b397)
    #18 0x00007ffff7c92564 _IO_file_doallocate (libc.so.6 + 0x74564)
    #19 0x00007ffff7ca0db0 _IO_doallocbuf (libc.so.6 + 0x82db0)
    #20 0x00007ffff7c9fcbc _IO_file_underflow@@GLIBC_2.2.5 (libc.so.6 + 0x81cbc)
    #21 0x00007ffff7ca0e66 _IO_default_uflow (libc.so.6 + 0x82e66)
    #22 0x00005555555a8463 shingetline (zsh + 0x54463)
    #23 0x00005555555a8a29 n/a (zsh + 0x54a29)
    #24 0x00005555555b2666 n/a (zsh + 0x5e666)
    #25 0x00005555555d2f17 parse_event (zsh + 0x7ef17)
    #26 0x00005555555a3f3f loop (zsh + 0x4ff3f)
    #27 0x00005555555a7d36 zsh_main (zsh + 0x53d36)
    #28 0x00007ffff7c45b25 __libc_start_main (libc.so.6 + 0x27b25)
    #29 0x000055555556b0ae _start (zsh + 0x170ae)

$ zsh --version
zsh 5.8 (x86_64-pc-linux-gnu)

Thanks,
zsugabubus




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