From c1d8c5b0e0ff4177ec06eed58ebcfd5a75b7f231 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Fri, 12 Apr 2019 14:12:36 -0500 Subject: [PATCH] Handle errors from close in perlasm scripts. If the xlate filter script fails, the outer script swallows the error, unless we check the return value of close. Change-Id: Ib506bb745a5d27b9d1df9329535bf81ad090f41f Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/35724 Reviewed-by: Adam Langley --- crypto/chacha/asm/chacha-armv4.pl | 2 +- crypto/chacha/asm/chacha-armv8.pl | 2 +- crypto/chacha/asm/chacha-x86.pl | 2 +- crypto/chacha/asm/chacha-x86_64.pl | 2 +- crypto/cipher_extra/asm/aes128gcmsiv-x86_64.pl | 2 +- crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl | 2 +- crypto/fipsmodule/aes/asm/aes-586.pl | 2 +- crypto/fipsmodule/aes/asm/aes-armv4.pl | 2 +- crypto/fipsmodule/aes/asm/aes-x86_64.pl | 2 +- crypto/fipsmodule/aes/asm/aesni-x86.pl | 2 +- crypto/fipsmodule/aes/asm/aesni-x86_64.pl | 2 +- crypto/fipsmodule/aes/asm/aesp8-ppc.pl | 2 +- crypto/fipsmodule/aes/asm/aesv8-armx.pl | 2 +- crypto/fipsmodule/aes/asm/bsaes-armv7.pl | 2 +- crypto/fipsmodule/aes/asm/vpaes-armv8.pl | 2 +- crypto/fipsmodule/aes/asm/vpaes-x86.pl | 2 +- crypto/fipsmodule/aes/asm/vpaes-x86_64.pl | 2 +- crypto/fipsmodule/bn/asm/armv4-mont.pl | 2 +- crypto/fipsmodule/bn/asm/armv8-mont.pl | 2 +- crypto/fipsmodule/bn/asm/bn-586.pl | 2 +- crypto/fipsmodule/bn/asm/co-586.pl | 2 +- crypto/fipsmodule/bn/asm/rsaz-avx2.pl | 2 +- crypto/fipsmodule/bn/asm/x86-mont.pl | 2 +- crypto/fipsmodule/bn/asm/x86_64-mont.pl | 2 +- crypto/fipsmodule/bn/asm/x86_64-mont5.pl | 2 +- crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl | 2 +- crypto/fipsmodule/ec/asm/p256_beeu-x86_64-asm.pl | 2 +- crypto/fipsmodule/md5/asm/md5-586.pl | 2 +- crypto/fipsmodule/md5/asm/md5-x86_64.pl | 2 +- crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl | 2 +- crypto/fipsmodule/modes/asm/ghash-armv4.pl | 2 +- crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl | 2 +- crypto/fipsmodule/modes/asm/ghash-ssse3-x86.pl | 2 +- crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl | 2 +- crypto/fipsmodule/modes/asm/ghash-x86.pl | 2 +- crypto/fipsmodule/modes/asm/ghash-x86_64.pl | 2 +- crypto/fipsmodule/modes/asm/ghashp8-ppc.pl | 2 +- crypto/fipsmodule/modes/asm/ghashv8-armx.pl | 2 +- crypto/fipsmodule/rand/asm/rdrand-x86_64.pl | 2 +- crypto/fipsmodule/sha/asm/sha1-586.pl | 2 +- crypto/fipsmodule/sha/asm/sha1-armv4-large.pl | 2 +- crypto/fipsmodule/sha/asm/sha1-armv8.pl | 2 +- crypto/fipsmodule/sha/asm/sha1-x86_64.pl | 2 +- crypto/fipsmodule/sha/asm/sha256-586.pl | 2 +- crypto/fipsmodule/sha/asm/sha256-armv4.pl | 2 +- crypto/fipsmodule/sha/asm/sha512-586.pl | 2 +- crypto/fipsmodule/sha/asm/sha512-armv4.pl | 2 +- crypto/fipsmodule/sha/asm/sha512-armv8.pl | 2 +- crypto/fipsmodule/sha/asm/sha512-x86_64.pl | 2 +- crypto/test/asm/trampoline-armv4.pl | 2 +- crypto/test/asm/trampoline-armv8.pl | 2 +- crypto/test/asm/trampoline-x86.pl | 2 +- crypto/test/asm/trampoline-x86_64.pl | 2 +- 53 files changed, 53 insertions(+), 53 deletions(-) diff --git a/crypto/chacha/asm/chacha-armv4.pl b/crypto/chacha/asm/chacha-armv4.pl index 2a9a7d7b0..06be3a664 100755 --- a/crypto/chacha/asm/chacha-armv4.pl +++ b/crypto/chacha/asm/chacha-armv4.pl @@ -1161,4 +1161,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/chacha/asm/chacha-armv8.pl b/crypto/chacha/asm/chacha-armv8.pl index 7795f2cbb..02325e7a2 100755 --- a/crypto/chacha/asm/chacha-armv8.pl +++ b/crypto/chacha/asm/chacha-armv8.pl @@ -1134,4 +1134,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; # flush +close STDOUT or die "error closing STDOUT"; # flush diff --git a/crypto/chacha/asm/chacha-x86.pl b/crypto/chacha/asm/chacha-x86.pl index 1d6a4e2b7..ec1cf8005 100755 --- a/crypto/chacha/asm/chacha-x86.pl +++ b/crypto/chacha/asm/chacha-x86.pl @@ -769,4 +769,4 @@ sub SSSE3ROUND { # critical path is 20 "SIMD ticks" per round &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/chacha/asm/chacha-x86_64.pl b/crypto/chacha/asm/chacha-x86_64.pl index 6be270ec5..ab8a1f78a 100755 --- a/crypto/chacha/asm/chacha-x86_64.pl +++ b/crypto/chacha/asm/chacha-x86_64.pl @@ -2782,4 +2782,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/cipher_extra/asm/aes128gcmsiv-x86_64.pl b/crypto/cipher_extra/asm/aes128gcmsiv-x86_64.pl index 1a3d064e0..54f0b5cb0 100644 --- a/crypto/cipher_extra/asm/aes128gcmsiv-x86_64.pl +++ b/crypto/cipher_extra/asm/aes128gcmsiv-x86_64.pl @@ -2253,4 +2253,4 @@ aes256gcmsiv_kdf(); print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl b/crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl index 0e322798e..5b2b977d5 100644 --- a/crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl +++ b/crypto/cipher_extra/asm/chacha20_poly1305_x86_64.pl @@ -2485,4 +2485,4 @@ dummy_chacha20_poly1305_asm: ___ } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/aes/asm/aes-586.pl b/crypto/fipsmodule/aes/asm/aes-586.pl index 25f1813d2..9b373de20 100755 --- a/crypto/fipsmodule/aes/asm/aes-586.pl +++ b/crypto/fipsmodule/aes/asm/aes-586.pl @@ -2997,4 +2997,4 @@ sub deckey() &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/aes/asm/aes-armv4.pl b/crypto/fipsmodule/aes/asm/aes-armv4.pl index f4ae922b7..9eebb2244 100644 --- a/crypto/fipsmodule/aes/asm/aes-armv4.pl +++ b/crypto/fipsmodule/aes/asm/aes-armv4.pl @@ -1247,4 +1247,4 @@ while() { close SELF; print $code; -close STDOUT; # enforce flush +close STDOUT or die "error closing STDOUT"; # enforce flush diff --git a/crypto/fipsmodule/aes/asm/aes-x86_64.pl b/crypto/fipsmodule/aes/asm/aes-x86_64.pl index ea8b9a413..5b95785e0 100755 --- a/crypto/fipsmodule/aes/asm/aes-x86_64.pl +++ b/crypto/fipsmodule/aes/asm/aes-x86_64.pl @@ -2906,4 +2906,4 @@ $code =~ s/\`([^\`]*)\`/eval($1)/gem; print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/aes/asm/aesni-x86.pl b/crypto/fipsmodule/aes/asm/aesni-x86.pl index fcb5b9891..d57127aba 100644 --- a/crypto/fipsmodule/aes/asm/aesni-x86.pl +++ b/crypto/fipsmodule/aes/asm/aesni-x86.pl @@ -2551,4 +2551,4 @@ if ($PREFIX eq $AESNI_PREFIX) { &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/aes/asm/aesni-x86_64.pl b/crypto/fipsmodule/aes/asm/aesni-x86_64.pl index b608425e7..15f68059f 100644 --- a/crypto/fipsmodule/aes/asm/aesni-x86_64.pl +++ b/crypto/fipsmodule/aes/asm/aesni-x86_64.pl @@ -5108,4 +5108,4 @@ $code =~ s/\bmovbe\s+%eax,\s*([0-9]+)\(%rsp\)/movbe($1)/gem; print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/aes/asm/aesp8-ppc.pl b/crypto/fipsmodule/aes/asm/aesp8-ppc.pl index 201da1a4f..7f06720cd 100644 --- a/crypto/fipsmodule/aes/asm/aesp8-ppc.pl +++ b/crypto/fipsmodule/aes/asm/aesp8-ppc.pl @@ -3802,4 +3802,4 @@ foreach(split("\n",$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/aes/asm/aesv8-armx.pl b/crypto/fipsmodule/aes/asm/aesv8-armx.pl index 13f86a0b6..187c2219c 100644 --- a/crypto/fipsmodule/aes/asm/aesv8-armx.pl +++ b/crypto/fipsmodule/aes/asm/aesv8-armx.pl @@ -1018,4 +1018,4 @@ if ($flavour =~ /64/) { ######## 64-bit code } } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/aes/asm/bsaes-armv7.pl b/crypto/fipsmodule/aes/asm/bsaes-armv7.pl index d4db3b4d1..932b3b683 100644 --- a/crypto/fipsmodule/aes/asm/bsaes-armv7.pl +++ b/crypto/fipsmodule/aes/asm/bsaes-armv7.pl @@ -2431,4 +2431,4 @@ close SELF; print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/aes/asm/vpaes-armv8.pl b/crypto/fipsmodule/aes/asm/vpaes-armv8.pl index 5fa06d831..bae5e7e9f 100755 --- a/crypto/fipsmodule/aes/asm/vpaes-armv8.pl +++ b/crypto/fipsmodule/aes/asm/vpaes-armv8.pl @@ -1359,4 +1359,4 @@ ___ print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/aes/asm/vpaes-x86.pl b/crypto/fipsmodule/aes/asm/vpaes-x86.pl index 81e7e8429..2b403628a 100644 --- a/crypto/fipsmodule/aes/asm/vpaes-x86.pl +++ b/crypto/fipsmodule/aes/asm/vpaes-x86.pl @@ -920,4 +920,4 @@ $k_dsbo=0x2c0; # decryption sbox final output &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/aes/asm/vpaes-x86_64.pl b/crypto/fipsmodule/aes/asm/vpaes-x86_64.pl index 9429344bc..45463e8a5 100644 --- a/crypto/fipsmodule/aes/asm/vpaes-x86_64.pl +++ b/crypto/fipsmodule/aes/asm/vpaes-x86_64.pl @@ -1550,4 +1550,4 @@ $code =~ s/\`([^\`]*)\`/eval($1)/gem; print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/bn/asm/armv4-mont.pl b/crypto/fipsmodule/bn/asm/armv4-mont.pl index 2ee389e2a..f3aa4be59 100644 --- a/crypto/fipsmodule/bn/asm/armv4-mont.pl +++ b/crypto/fipsmodule/bn/asm/armv4-mont.pl @@ -759,4 +759,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/bn/asm/armv8-mont.pl b/crypto/fipsmodule/bn/asm/armv8-mont.pl index aab9eaae8..db2ba491e 100644 --- a/crypto/fipsmodule/bn/asm/armv8-mont.pl +++ b/crypto/fipsmodule/bn/asm/armv8-mont.pl @@ -1507,4 +1507,4 @@ ___ print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/bn/asm/bn-586.pl b/crypto/fipsmodule/bn/asm/bn-586.pl index 16818d55e..05ef28c22 100644 --- a/crypto/fipsmodule/bn/asm/bn-586.pl +++ b/crypto/fipsmodule/bn/asm/bn-586.pl @@ -31,7 +31,7 @@ for (@ARGV) { $sse2=1 if (/-DOPENSSL_IA32_SSE2/); } &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; sub bn_mul_add_words { diff --git a/crypto/fipsmodule/bn/asm/co-586.pl b/crypto/fipsmodule/bn/asm/co-586.pl index 5eeeef979..abe328add 100644 --- a/crypto/fipsmodule/bn/asm/co-586.pl +++ b/crypto/fipsmodule/bn/asm/co-586.pl @@ -22,7 +22,7 @@ open STDOUT,">$output"; &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; sub mul_add_c { diff --git a/crypto/fipsmodule/bn/asm/rsaz-avx2.pl b/crypto/fipsmodule/bn/asm/rsaz-avx2.pl index 51feb6999..a0da23906 100755 --- a/crypto/fipsmodule/bn/asm/rsaz-avx2.pl +++ b/crypto/fipsmodule/bn/asm/rsaz-avx2.pl @@ -1940,4 +1940,4 @@ rsaz_1024_gather5_avx2: ___ }}} -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/bn/asm/x86-mont.pl b/crypto/fipsmodule/bn/asm/x86-mont.pl index 214f2b085..1f61ae55d 100755 --- a/crypto/fipsmodule/bn/asm/x86-mont.pl +++ b/crypto/fipsmodule/bn/asm/x86-mont.pl @@ -628,4 +628,4 @@ $sbit=$num; &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/bn/asm/x86_64-mont.pl b/crypto/fipsmodule/bn/asm/x86_64-mont.pl index 3d98e728f..0a9e4d162 100755 --- a/crypto/fipsmodule/bn/asm/x86_64-mont.pl +++ b/crypto/fipsmodule/bn/asm/x86_64-mont.pl @@ -1578,4 +1578,4 @@ ___ } print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/bn/asm/x86_64-mont5.pl b/crypto/fipsmodule/bn/asm/x86_64-mont5.pl index abcfe6aaf..b2ff1149e 100755 --- a/crypto/fipsmodule/bn/asm/x86_64-mont5.pl +++ b/crypto/fipsmodule/bn/asm/x86_64-mont5.pl @@ -3930,4 +3930,4 @@ ___ $code =~ s/\`([^\`]*)\`/eval($1)/gem; print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl b/crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl index 54028856e..6a021dbcf 100755 --- a/crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl +++ b/crypto/fipsmodule/ec/asm/p256-x86_64-asm.pl @@ -4146,4 +4146,4 @@ ___ $code =~ s/\`([^\`]*)\`/eval $1/gem; print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/ec/asm/p256_beeu-x86_64-asm.pl b/crypto/fipsmodule/ec/asm/p256_beeu-x86_64-asm.pl index 0bb65477a..c05abba80 100644 --- a/crypto/fipsmodule/ec/asm/p256_beeu-x86_64-asm.pl +++ b/crypto/fipsmodule/ec/asm/p256_beeu-x86_64-asm.pl @@ -400,4 +400,4 @@ beeu_mod_inverse_vartime: ___ print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/md5/asm/md5-586.pl b/crypto/fipsmodule/md5/asm/md5-586.pl index ded94425d..20c226bc2 100644 --- a/crypto/fipsmodule/md5/asm/md5-586.pl +++ b/crypto/fipsmodule/md5/asm/md5-586.pl @@ -36,7 +36,7 @@ $X="esi"; &md5_block("md5_block_asm_data_order"); &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; sub Np { diff --git a/crypto/fipsmodule/md5/asm/md5-x86_64.pl b/crypto/fipsmodule/md5/asm/md5-x86_64.pl index 6eb33c0ec..509bcdead 100644 --- a/crypto/fipsmodule/md5/asm/md5-x86_64.pl +++ b/crypto/fipsmodule/md5/asm/md5-x86_64.pl @@ -380,4 +380,4 @@ ___ print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl b/crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl index b9edb7993..d3e37636b 100644 --- a/crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl +++ b/crypto/fipsmodule/modes/asm/aesni-gcm-x86_64.pl @@ -1143,4 +1143,4 @@ $code =~ s/\`([^\`]*)\`/eval($1)/gem; print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/modes/asm/ghash-armv4.pl b/crypto/fipsmodule/modes/asm/ghash-armv4.pl index 778b5436c..54c80f75f 100644 --- a/crypto/fipsmodule/modes/asm/ghash-armv4.pl +++ b/crypto/fipsmodule/modes/asm/ghash-armv4.pl @@ -553,4 +553,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; # enforce flush +close STDOUT or die "error closing STDOUT"; # enforce flush diff --git a/crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl b/crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl index 972be419a..f57017d05 100644 --- a/crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl +++ b/crypto/fipsmodule/modes/asm/ghash-neon-armv8.pl @@ -284,4 +284,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; # enforce flush +close STDOUT or die "error closing STDOUT"; # enforce flush diff --git a/crypto/fipsmodule/modes/asm/ghash-ssse3-x86.pl b/crypto/fipsmodule/modes/asm/ghash-ssse3-x86.pl index 0d9ce156e..45e1ee1c7 100644 --- a/crypto/fipsmodule/modes/asm/ghash-ssse3-x86.pl +++ b/crypto/fipsmodule/modes/asm/ghash-ssse3-x86.pl @@ -285,4 +285,4 @@ ____ &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl b/crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl index 1dd251992..e0e501055 100644 --- a/crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl +++ b/crypto/fipsmodule/modes/asm/ghash-ssse3-x86_64.pl @@ -410,4 +410,4 @@ ____ } print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/modes/asm/ghash-x86.pl b/crypto/fipsmodule/modes/asm/ghash-x86.pl index 02edf0335..a2ab859c6 100644 --- a/crypto/fipsmodule/modes/asm/ghash-x86.pl +++ b/crypto/fipsmodule/modes/asm/ghash-x86.pl @@ -1150,7 +1150,7 @@ my ($Xhi,$Xi)=@_; &asciz("GHASH for x86, CRYPTOGAMS by "); &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; # A question was risen about choice of vanilla MMX. Or rather why wasn't # SSE2 chosen instead? In addition to the fact that MMX runs on legacy diff --git a/crypto/fipsmodule/modes/asm/ghash-x86_64.pl b/crypto/fipsmodule/modes/asm/ghash-x86_64.pl index b26769855..5c4122fe8 100644 --- a/crypto/fipsmodule/modes/asm/ghash-x86_64.pl +++ b/crypto/fipsmodule/modes/asm/ghash-x86_64.pl @@ -1803,4 +1803,4 @@ $code =~ s/\`([^\`]*)\`/eval($1)/gem; print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/modes/asm/ghashp8-ppc.pl b/crypto/fipsmodule/modes/asm/ghashp8-ppc.pl index c46cdb5d7..7a1259ba0 100644 --- a/crypto/fipsmodule/modes/asm/ghashp8-ppc.pl +++ b/crypto/fipsmodule/modes/asm/ghashp8-ppc.pl @@ -667,4 +667,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; # enforce flush +close STDOUT or die "error closing STDOUT"; # enforce flush diff --git a/crypto/fipsmodule/modes/asm/ghashv8-armx.pl b/crypto/fipsmodule/modes/asm/ghashv8-armx.pl index 1435db504..99124a2b3 100644 --- a/crypto/fipsmodule/modes/asm/ghashv8-armx.pl +++ b/crypto/fipsmodule/modes/asm/ghashv8-armx.pl @@ -425,4 +425,4 @@ if ($flavour =~ /64/) { ######## 64-bit code } } -close STDOUT; # enforce flush +close STDOUT or die "error closing STDOUT"; # enforce flush diff --git a/crypto/fipsmodule/rand/asm/rdrand-x86_64.pl b/crypto/fipsmodule/rand/asm/rdrand-x86_64.pl index 76b5f9b70..eb2a59262 100644 --- a/crypto/fipsmodule/rand/asm/rdrand-x86_64.pl +++ b/crypto/fipsmodule/rand/asm/rdrand-x86_64.pl @@ -84,4 +84,4 @@ CRYPTO_rdrand_multiple8_buf: .size CRYPTO_rdrand_multiple8_buf,.-CRYPTO_rdrand_multiple8_buf ___ -close STDOUT; # flush +close STDOUT or die "error closing STDOUT"; # flush diff --git a/crypto/fipsmodule/sha/asm/sha1-586.pl b/crypto/fipsmodule/sha/asm/sha1-586.pl index 87fd361a3..bf4296146 100644 --- a/crypto/fipsmodule/sha/asm/sha1-586.pl +++ b/crypto/fipsmodule/sha/asm/sha1-586.pl @@ -1483,4 +1483,4 @@ sub Xtail_avx() &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/sha/asm/sha1-armv4-large.pl b/crypto/fipsmodule/sha/asm/sha1-armv4-large.pl index 27187dd60..ca825146f 100644 --- a/crypto/fipsmodule/sha/asm/sha1-armv4-large.pl +++ b/crypto/fipsmodule/sha/asm/sha1-armv4-large.pl @@ -740,4 +740,4 @@ foreach (split($/,$code)) { print $_,$/; } -close STDOUT; # enforce flush +close STDOUT or die "error closing STDOUT"; # enforce flush diff --git a/crypto/fipsmodule/sha/asm/sha1-armv8.pl b/crypto/fipsmodule/sha/asm/sha1-armv8.pl index 7c8880fb2..c1474626d 100644 --- a/crypto/fipsmodule/sha/asm/sha1-armv8.pl +++ b/crypto/fipsmodule/sha/asm/sha1-armv8.pl @@ -353,4 +353,4 @@ foreach(split("\n",$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/sha/asm/sha1-x86_64.pl b/crypto/fipsmodule/sha/asm/sha1-x86_64.pl index fd4ff2ac4..df7cbc309 100755 --- a/crypto/fipsmodule/sha/asm/sha1-x86_64.pl +++ b/crypto/fipsmodule/sha/asm/sha1-x86_64.pl @@ -2122,4 +2122,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/sha/asm/sha256-586.pl b/crypto/fipsmodule/sha/asm/sha256-586.pl index 129a9f422..240a604a0 100644 --- a/crypto/fipsmodule/sha/asm/sha256-586.pl +++ b/crypto/fipsmodule/sha/asm/sha256-586.pl @@ -1287,4 +1287,4 @@ sub bodyx_00_15 () { # +10% &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/sha/asm/sha256-armv4.pl b/crypto/fipsmodule/sha/asm/sha256-armv4.pl index e5ecdfd16..15d78de6d 100644 --- a/crypto/fipsmodule/sha/asm/sha256-armv4.pl +++ b/crypto/fipsmodule/sha/asm/sha256-armv4.pl @@ -735,4 +735,4 @@ foreach (split($/,$code)) { print $_,"\n"; } -close STDOUT; # enforce flush +close STDOUT or die "error closing STDOUT"; # enforce flush diff --git a/crypto/fipsmodule/sha/asm/sha512-586.pl b/crypto/fipsmodule/sha/asm/sha512-586.pl index 25a5f255c..01acf6799 100644 --- a/crypto/fipsmodule/sha/asm/sha512-586.pl +++ b/crypto/fipsmodule/sha/asm/sha512-586.pl @@ -922,4 +922,4 @@ sub BODY_00_15_ssse3 { # "phase-less" copy of BODY_00_15_sse2 &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/sha/asm/sha512-armv4.pl b/crypto/fipsmodule/sha/asm/sha512-armv4.pl index cc247a446..c8c715e51 100644 --- a/crypto/fipsmodule/sha/asm/sha512-armv4.pl +++ b/crypto/fipsmodule/sha/asm/sha512-armv4.pl @@ -670,4 +670,4 @@ while() { close SELF; print $code; -close STDOUT; # enforce flush +close STDOUT or die "error closing STDOUT"; # enforce flush diff --git a/crypto/fipsmodule/sha/asm/sha512-armv8.pl b/crypto/fipsmodule/sha/asm/sha512-armv8.pl index 3f69071f6..64306be8d 100644 --- a/crypto/fipsmodule/sha/asm/sha512-armv8.pl +++ b/crypto/fipsmodule/sha/asm/sha512-armv8.pl @@ -457,4 +457,4 @@ foreach(split("\n",$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/fipsmodule/sha/asm/sha512-x86_64.pl b/crypto/fipsmodule/sha/asm/sha512-x86_64.pl index 49278506c..ca827a69e 100755 --- a/crypto/fipsmodule/sha/asm/sha512-x86_64.pl +++ b/crypto/fipsmodule/sha/asm/sha512-x86_64.pl @@ -2083,4 +2083,4 @@ foreach (split("\n",$code)) { print $_,"\n"; } -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/test/asm/trampoline-armv4.pl b/crypto/test/asm/trampoline-armv4.pl index 30f510e75..6118dd7b7 100755 --- a/crypto/test/asm/trampoline-armv4.pl +++ b/crypto/test/asm/trampoline-armv4.pl @@ -179,4 +179,4 @@ ____ } print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/test/asm/trampoline-armv8.pl b/crypto/test/asm/trampoline-armv8.pl index aab5250be..410b59ef5 100755 --- a/crypto/test/asm/trampoline-armv8.pl +++ b/crypto/test/asm/trampoline-armv8.pl @@ -206,4 +206,4 @@ ____ } print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/test/asm/trampoline-x86.pl b/crypto/test/asm/trampoline-x86.pl index 569a3dd78..4244ac2aa 100755 --- a/crypto/test/asm/trampoline-x86.pl +++ b/crypto/test/asm/trampoline-x86.pl @@ -120,4 +120,4 @@ foreach (0..7) { &asm_finish(); -close STDOUT; +close STDOUT or die "error closing STDOUT"; diff --git a/crypto/test/asm/trampoline-x86_64.pl b/crypto/test/asm/trampoline-x86_64.pl index 8cb14108a..5196141c8 100755 --- a/crypto/test/asm/trampoline-x86_64.pl +++ b/crypto/test/asm/trampoline-x86_64.pl @@ -556,4 +556,4 @@ ____ } print $code; -close STDOUT; +close STDOUT or die "error closing STDOUT";