[all-commits] [llvm/llvm-project] 5be3fd: [lldb] Use std::atomic<bool> for Editline's pendin...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Tue Jul 14 16:35:18 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5be3fdbc59fd78d0b86236ebc44c10c41571ce4c
      https://github.com/llvm/llvm-project/commit/5be3fdbc59fd78d0b86236ebc44c10c41571ce4c
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    M lldb/include/lldb/Host/Editline.h
    M lldb/source/Host/common/Editline.cpp

  Log Message:
  -----------
  [lldb] Use std::atomic<bool> for Editline's pending-resize flag (#209619)

TerminalSizeChanged() used a volatile std::sig_atomic_t to record that a
resize is pending. That type was chosen because the SIGWINCH handler ran
in async-signal context and could only touch an sig_atomic_t. Signals
are now handled on a dedicated thread, so the flag is written from a
normal thread and std::atomic<bool> is sufficient to handle that.

el_resize() still runs on the thread that owns libedit, in its read
loop. I discovered that it is not safe to run elsewhere, because it
resets libedit's display model without redrawing. Applying it off that
thread seems to throw it off and makes it duplicate the prompt.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list