[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/5] xen/tools: fix grep reporting 'illegal byte sequence' in check-endbr.sh
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Wed, 11 Feb 2026 11:46:36 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=o7XzdqwuGAV5YHCJRquaLBzI+WwKGfkVfdOG5E//3D4=; b=SvhULgMTdaNua61CIFHe2LqlQJnmcXJ4+OwCVnDpgQ+9knFDJz/IsieQ1cdkwaXo6waQMLAqUB6vcx4p8Nc4F+QZHtQe9S7hr+5lGnYGcwksGFAl8judJhjbkRh3vsHXMLrzdBUltbHZDpISNjAkk/GWnCcRCRSEXVoxRNWQPa7qJFqF8QxecuyGtbJfE09PFpD2EAgN5r/GlS/g0bbseDeg3iI4ncodoP/a8Qoimn7w0GuFom12VPX0hgUyVbXRWylnX66z4ldfQ1y7qmnzuYReamanPb+XeafRo7U3yn7KwcHU7sklk1EIGGs2DtiuuI09SRuXQ4+L7CXHFB7Otw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tXvMrF1XN4c+YntWJDWobQ3OylDk1ojIiY6DJec6UvmS4YpuZ4IXN1rbu03GeN8AQlGeMQdCY9LLTZ10v/FkpIJivX3VZuocDgOQBx9f6J4GJVqcxbioY99YdvFO+SxWgG+mg9JQ5phmhaCKwUdjAL0XPdDnva7FlBKTaBKuYe6GbJX1asxv1pIFOi6JMhqyXfMmB9FvClPKVBF6SSvzRmCSxjsYKtsuOdO1J3ujLPsUWekAxdel7eMro9FNCYtAjydBc0zk+sBotl9VA/8jQ8miEyp7qN6zMIWJiDHEvs3XB0V9nWjZAI/soP8YeHmYcxHKz8v66zs0hYQ/AjuxSw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>
- Delivery-date: Wed, 11 Feb 2026 10:47:12 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On macOS the default encoding is UTF-8. The binary encoding used by the
grep matching pattern is not valid when processed as UTF-8. Switch the
local to C just for the grep invocation to use the binary match pattern
correctly.
Suggested-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
xen/tools/check-endbr.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/xen/tools/check-endbr.sh b/xen/tools/check-endbr.sh
index 383d7e710a53..0be9986dd356 100755
--- a/xen/tools/check-endbr.sh
+++ b/xen/tools/check-endbr.sh
@@ -109,8 +109,9 @@ if $perl_re
then
LC_ALL=C grep -aobP '\xf3\x0f\x1e(\xfa|\xfb)|\x66\x0f\x1f\x01' $TEXT_BIN
else
- grep -aob -e "$(printf '\363\17\36\372')" -e "$(printf '\363\17\36\373')" \
- -e "$(printf '\146\17\37\1')" $TEXT_BIN
+ LC_ALL=C grep -aob -e "$(printf '\363\17\36\372')" \
+ -e "$(printf '\363\17\36\373')" \
+ -e "$(printf '\146\17\37\1')" $TEXT_BIN
fi | $AWK -F':' '{printf "%s%07x\n", "'$vma_hi'", int('$((0x$vma_lo))') + $1}'
> $ALL
# Wait for $VALID to become complete
--
2.51.0
|