Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Aug 2023 21:47:20 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: eba6abafc198 - main - OpenSSL: Fix handling of the "0:" label in arm-xlate.pl
Message-ID:  <202308292147.37TLlKHc087539@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=eba6abafc1988dc8753b08822abff333d4810e75

commit eba6abafc1988dc8753b08822abff333d4810e75
Author:     Tom Cosgrove <tom.cosgrove@arm.com>
AuthorDate: 2023-08-29 21:38:11 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-08-29 21:38:11 +0000

    OpenSSL: Fix handling of the "0:" label in arm-xlate.pl
    
    When $label == "0", $label is not truthy, so `if ($label)` thinks there isn't
    a label. Correct this by looking at the result of the s/// command.
    
    Verified that there are no changes in the .S files created during a normal
    build, and that the "0:" labels appear in the translation given in the error
    report (and they are the only difference in the before and after output).
    
    Obtained from:  OpenSSL commit 9607f5ccf285ac9988a86f95c5ad9f92b556a843
    
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D41587
---
 crypto/openssl/crypto/perlasm/arm-xlate.pl | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/crypto/openssl/crypto/perlasm/arm-xlate.pl b/crypto/openssl/crypto/perlasm/arm-xlate.pl
index a90885905c0f..57b75c4e5dad 100755
--- a/crypto/openssl/crypto/perlasm/arm-xlate.pl
+++ b/crypto/openssl/crypto/perlasm/arm-xlate.pl
@@ -159,9 +159,8 @@ while(my $line=<>) {
     }
 
     {
-	$line =~ s|(^[\.\w]+)\:\s*||;
-	my $label = $1;
-	if ($label) {
+	if ($line =~ s|(^[\.\w]+)\:\s*||) {
+	    my $label = $1;
 	    printf "%s:",($GLOBALS{$label} or $label);
 	}
     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308292147.37TLlKHc087539>