bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Another call of async-signal-unsafe function


From: Roman Rakus
Subject: Another call of async-signal-unsafe function
Date: Mon, 07 Nov 2011 15:05:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0

There's a small chance to call unsafe function (malloc) during signal handling. It occurs during bash 4.2 startup, when user resize window. Occurs on bash configured to use system malloc (not bash malloc).
The stack trace:

#0  __lll_lock_wait_private () at
../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:96
#1  0x0000003bfec82891 in _L_lock_10436 () from /lib64/libc.so.6
#2  0x0000003bfec80657 in __GI___libc_malloc (bytes=257680926464) at
malloc.c:2921
#3  0x0000000000468973 in xmalloc (bytes=3) at xmalloc.c:112
#4  0x0000000000436249 in make_variable_value (var=0x10d1860,
value=0x7ffff3ae8489 "58", flags=<optimized out>) at variables.c:2176
#5  0x0000000000437247 in bind_variable_internal (name=0x4a7a7e "LINES",
value=0x7ffff3ae8489 "58", table=0x10a4830, hflags=<optimized out>, aflags=0)
at variables.c:2234
#6  0x0000000000437ab6 in sh_set_lines_and_columns (lines=<optimized out>,
cols=197) at variables.c:920
#7  0x000000000049c6fb in _rl_get_screen_size (tty=<optimized out>,
ignore_env=1) at terminal.c:299
#8  0x000000000049c8ec in rl_resize_terminal () at terminal.c:353
#9  0x0000000000499372 in rl_sigwinch_handler (sig=28) at signals.c:260
#10<signal handler called>
#11 _int_malloc (av=0x3bfefae700, bytes=1024) at malloc.c:3868
#12 0x0000003bfec80665 in __GI___libc_malloc (bytes=1024) at malloc.c:2924
#13 0x0000000000468973 in xmalloc (bytes=1024) at xmalloc.c:112
#14 0x0000000000494ca7 in init_line_structures (minsize=<optimized out>) at
display.c:481
#15 0x0000000000498879 in rl_redisplay () at display.c:522
#16 0x0000000000487ad1 in readline_internal_setup () at readline.c:445
#17 0x000000000048890d in readline_internal () at readline.c:643
#18 e (prompt=<optimized out>) at readline.c:388
#19 0x000000000041e45c in yy_readline_get () at ./parse.y:1443
#20 0x00000000004203b9 in yy_getc () at ./parse.y:1376
#21 shell_getc (remove_quoted_newline=1) at ./parse.y:2231
#22 shell_getc (remove_quoted_newline=1) at ./parse.y:2159
#23 0x0000000000422d56 in read_token (command=<optimized out>) at
./parse.y:2908
#24 read_token (command=0) at ./parse.y:2859
#25 0x000000000042581d in yylex () at ./parse.y:2517
#26 yyparse () at y.tab.c:2031
#27 0x000000000041dd1a in parse_command () at eval.c:229
#28 0x000000000041dde6 in read_command () at eval.c:273
#29 0x000000000041e033 in reader_loop () at eval.c:138
#30 0x000000000041c79f in main (argc=1, argv=0x7ffff3ae9e58,
env=0x7ffff3ae9e68) at shell.c:759


RR



reply via email to

[Prev in Thread] Current Thread [Next in Thread]