warp icon indicating copy to clipboard operation
warp copied to clipboard

Null characters (“NUL”) in text file when redirecting GCC/OpenMP output in Warp terminal

Open gaureshpai opened this issue 1 year ago • 0 comments

Pre-submit Checks

Describe the bug

When using the Warp terminal to run a C/C++ application compiled with GCC and OpenMP, redirecting the output to a text file produces a file filled with null characters (“NUL”) instead of the expected plain-text results. The issue is clearly visible in editors like VS Code, which highlight the nulls as red blocks.

To reproduce

  1. Compile an OpenMP C program (e.g., gcc -fopenmp main.c -o main.out).
  2. Run the executable, redirecting output to a text file (./main.out > output.txt).
  3. Open output.txt in an editor. Instead of readable output, the file contains null characters.
  4. The issue seems reproducible with even the minimal example below:
#include <stdio.h>
#include <omp.h>
int main() {
    #pragma omp parallel for
    for(int i = 0; i < 10; i++)
        printf("%d\n", i);
    return 0;
}

Expected behavior

The redirected output file should contain the program's human-readable results without any null characters or unreadable binary content.

Screenshots, videos, and logs

Image Image

Operating system (OS)

Windows

Operating system and version

Windows 11

Shell Version

Current Warp version

v0.2025.09.03.08.11.stable_02

Regression

Yes, this bug started recently or with an X Warp version

Recent working Warp date

14/09/2025

Additional context

  • Issue does not occur when running the exact same commands in GNOME Terminal, Windows Terminal, or Konsole.
  • No conflicting dotfiles/plugins in use.
  • Using X11 as the display server.
  • Running Warp with low-level debug logs does not output additional error messages related to file writing.
  • No antivirus/EDR interference observed.
  • The bug occurs both with and without explicit fflush(stdout) statements in code.

Does this block you from using Warp daily?

No

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

Ignore

gaureshpai avatar Sep 14 '25 18:09 gaureshpai