bug-bash
[Top][All Lists]
Advanced

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

Re: unsafe signal handler


From: Tim Waugh
Subject: Re: unsafe signal handler
Date: Thu, 21 Jul 2005 18:19:06 +0100
User-agent: Mutt/1.4.2.1i

Further information on unsafe functions used in signal handlers: a
brief inspection of the code in the termination_unwind_protect()
handler revealed other instances than the one highlighted before:

run_interrupt_trap->_run_trap_internal->savestring->xmalloc
(and more like that)

maybe_save_shell_history->append_history
  append_history->history_do_write
maybe_save_shell_history->write_history
  write_history->history_do_write
    history_do_write->savestring->xmalloc
    history_do_write->xmalloc
    history_do_write->malloc
    history_do_write->mmap

unlink_fifo_list->free

run_exit_trap->savestring->xmalloc
run_exit_trap->setjmp?
run_exit_trap->reset_parser->free
run_exit_trap->parse_and_execute->begin_unwind_frame->...->uwpalloc->xmalloc
(and more like that)

So regardless of the bash malloc() implementation, mmap() and setjmp()
are used from this signal handler and they may not be. (However, I
haven't been able to trigger either of these cases yet.)

Tim.
*/

Attachment: pgp0HpKvDkeUR.pgp
Description: PGP signature


reply via email to

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