From bac29943cb15eaf6801e233a6268f5cf015b6852 Mon Sep 17 00:00:00 2001 From: Andrew Liebenow Date: Fri, 18 Oct 2024 09:33:02 -0500 Subject: [PATCH] fuzz: run GNU Core Utilities with LC_ALL=C --- fuzz/fuzz_targets/fuzz_common.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fuzz/fuzz_targets/fuzz_common.rs b/fuzz/fuzz_targets/fuzz_common.rs index 6c261cf81..4cc04c8dc 100644 --- a/fuzz/fuzz_targets/fuzz_common.rs +++ b/fuzz/fuzz_targets/fuzz_common.rs @@ -231,6 +231,10 @@ pub fn run_gnu_cmd( command.arg(arg); } + // See https://github.com/uutils/coreutils/issues/6794 + // uutils' coreutils is not locale-aware, and aims to mirror/be compatible with GNU Core Utilities's LC_ALL=C behavior + command.env("LC_ALL", "C"); + let output = if let Some(input_str) = pipe_input { // We have an pipe input command