[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-readline] calling setenv/putenv from SIGWINCH signal handler
From: |
Lőrinczy Zsigmond |
Subject: |
[Bug-readline] calling setenv/putenv from SIGWINCH signal handler |
Date: |
Thu, 17 Oct 2013 15:49:50 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 |
Hello,
my bash-3.2.48 (uses readline-6.2) on AIX computer produces stange errors,
that I could trace back:
SIGWINCH->
signals.c:rl_sigwinch_handler ->
terminal.c:rl_resize_terminal ->
terminal.c:_rl_get_screen_size ->
shell.c:sh_set_lines_and_columns ->
libc:setenc ->
libc:putenv ->
libc: realloc
And finally realloc overwrites an unrelated data area (bash's
variables.c:export_env),
which causes bash to get SIGSEGV
My documentations suggest that one shouldn't call (directly or
indirectly) malloc/free/realloc from signal handler,
so I think there should be a way to let these setenv/putenv calls to be
delayed until the next readline-operation.
Yours: Lőrinczy Zsigmond
- [Bug-readline] calling setenv/putenv from SIGWINCH signal handler,
Lőrinczy Zsigmond <=