Skip to content

SIGSEGV hangs executables from the Zed terminal #42414

@denisdefreyne

Description

@denisdefreyne

Summary

An executable that receives the signal SIGSEGV hangs when run from the Zed terminal.

Description

Whe the shell program configuration is set, then any executable on macOS that receives a SIGSEGV (e.g. null pointer dereference) hangs, rather than terminating properly.

When using the default shell program (removing the shell program configuration), then the executables terminate properly (with a segfault message as expected).

Steps to reproduce:

  1. Create blah.c file with the following content:

    #include <stdio.h>
    
    int main(void) {
      char* a = NULL;
      *a = 4;
      return 1;
    }
  2. Compile it with: gcc blah.c -o blah

  3. In Zed, update the configuration to use an explicit shell program:

    {
      "terminal": {
        "shell": {
          "program": "bash"
        }
      }
    }
  4. In a Zed terminal, run ./blah

Expected Behavior: The program ./blah exits abnormally, with a message such as fish: Job 1, './blah' terminated by signal SIGSEGV (Address boundary error).

Actual Behavior: The program ./blah hangs without output and not coming back to the shell.

Image Image

OS: macOS Sequoia 15.7.1 (24G231)

uname -a: Darwin Osmium.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Aug 11 21:16:52 PDT 2025; root:xnu-11417.140.69.701.11~1/RELEASE_ARM64_T8112 arm64

Possibly related:

Zed configuration:

{
  "terminal": {
    "shell": {
      "program": "bash"
    }
  }
}

Further observations:

  • When removing the shell program configuration, and thus using the default shell, then the blah executable terminates as expected.

Zed Version and System Specs

Zed: v0.211.6 (Zed)
OS: macOS 15.7.1
Memory: 16 GiB
Architecture: aarch64

If applicable, attach your Zed.log file to this issue.

Zed.log

Metadata

Metadata

Assignees

Labels

area:integrations/terminalFeedback for terminal integration, shell commands, etcfrequency:commonBugs that happen for at least a third of the users across all platforms and kinds of usagepriority:P2Average run-of-the-mill bugsstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduce

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions