From unknown Sat Jun 21 10:38:42 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#73474 <73474@debbugs.gnu.org> To: bug#73474 <73474@debbugs.gnu.org> Subject: Status: Bug in factor utility of coreutils Reply-To: bug#73474 <73474@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:38:42 +0000 retitle 73474 Bug in factor utility of coreutils reassign 73474 coreutils submitter 73474 =D0=90=D1=80=D1=82=D0=B5=D0=BC =D0=9D=D0=B0=D1=81=D0=BE=D0= =BD=D0=BE=D0=B2 severity 73474 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 10:25:15 2024 Received: (at submit) by debbugs.gnu.org; 25 Sep 2024 14:25:15 +0000 Received: from localhost ([127.0.0.1]:40134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stSx6-0006Uh-UA for submit@debbugs.gnu.org; Wed, 25 Sep 2024 10:25:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:43690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stPil-0008Lm-Sw for submit@debbugs.gnu.org; Wed, 25 Sep 2024 06:58:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stPEw-0003eK-T7 for bug-coreutils@gnu.org; Wed, 25 Sep 2024 06:27:22 -0400 Received: from mx.astralinux.ru ([89.232.161.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1stPEs-0006Aw-CE for bug-coreutils@gnu.org; Wed, 25 Sep 2024 06:27:22 -0400 Received: from [10.177.185.109] (helo=new-mail.astralinux.ru) by mx.astralinux.ru with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1stPDI-00EpMh-Sm for bug-coreutils@gnu.org; Wed, 25 Sep 2024 13:25:40 +0300 Received: from [10.198.40.177] (unknown [10.198.40.177]) by new-mail.astralinux.ru (Postfix) with ESMTPA id 4XDCZz0XjwzkWbx; Wed, 25 Sep 2024 13:27:06 +0300 (MSK) Content-Type: multipart/mixed; boundary="------------cXD7VeZuUN00AWnqTgYFdr0V" Message-ID: <74983cb2-5af4-4d03-a823-c4581a34dfc0@astralinux.ru> Date: Wed, 25 Sep 2024 13:26:55 +0300 MIME-Version: 1.0 User-Agent: RuPost Desktop To: bug-coreutils@gnu.org From: =?UTF-8?B?0JDRgNGC0LXQvCDQndCw0YHQvtC90L7Qsg==?= Subject: Bug in factor utility of coreutils X-DrWeb-SpamScore: 0 X-DrWeb-SpamState: legit X-DrWeb-SpamDetail: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehuddgtddvucetufdoteggodetrfcurfhrohhfihhlvgemucfftfghgfeunecuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfgfvvefhufesmhdtreertderjeenucfhrhhomheptehpthgvmhcujfgrtghohhhouecuoegrnhgrshhonhhovhesrghsthhrrghlihhnuhigrdhruheqnecuggftrfgrthhtvghrnhepjeettdfhudegtdeileevgfegtedvteejheevieffieejffffvdelteejtefftdfhnecuffhomhgrihhnpegrshhtrhgrghhrohhuphdrrhhunecukfhppedutddrudelkedrgedtrddujeejnecurfgrrhgrmhephhgvlhhopegluddtrdduleekrdegtddrudejjegnpdhinhgvthepuddtrdduleekrdegtddrudejjeemgeefkedukedpmhgrihhlfhhrohhmpegrnhgrshhonhhovhesrghsthhrrghlihhnuhigrdhruhdpnhgspghrtghpthhtohepvddprhgtphhtthhopegsuhhgqdgtohhrvghuthhilhhssehgnhhurdhorhhgpdhrtghpthhtohepvhgvghhorhhovhgrsegrshhtrhgrlhhinhhugidrrhhunecuffhrrdghvggsucetnhhtihhsphgrmhemucenucfvrghgshem X-DrWeb-SpamVersion: Dr.Web Antispam 1.0.7.202406240#1727253355#02 X-AntiVirus: Checked by Dr.Web [MailD: 11.1.19.2307031128, SE: 11.1.12.2210241838, Core engine: 7.00.65.05230, Virus records: 12183828, Updated: 2024-Sep-25 09:05:52 UTC] Received-SPF: pass client-ip=89.232.161.68; envelope-from=anasonov@astralinux.ru; helo=mx.astralinux.ru X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 25 Sep 2024 10:19:39 -0400 Cc: =?UTF-8?B?0JLQuNC60YLQvtGA0LjRjyDQldCz0L7RgNC+0LLQsA==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This is a multi-part message in MIME format. --------------cXD7VeZuUN00AWnqTgYFdr0V Content-Type: multipart/alternative; boundary="------------KbNBcmGZryrCTbV3GkPsiGn0" --------------KbNBcmGZryrCTbV3GkPsiGn0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit To whom it may concern, I’m writing to let you know that I found an issue by fuzzing in coreutils in *factor* utility and want to report it. Here are some details: 1. Host architecture: Host it Debian x86_64 architecture 2. factor version: factor (GNU coreutils) 9.5.94-5cecd 3. Affected code area: src/factor.c:425 4. Steps to reproduce:     Working on commit: 5cecd703e57b2e1301767d82cbe5bb01cae88472 |    export CC="clang-17"     export CXX="clang++-17"     export CFLAGS="-fsanitize=address,undefined -g"     export LDFLAGS="-fsanitize=address,undefined -g"     export UBSAN_OPTIONS=halt_on_error=1,abort_on_error=1,print_stacktrace=true,symbolize=true,print_stacktrace=1,report_error_type=1,symbolize=1     ./bootstrap     ./configure     make     ./src/factor 22222222222222222202111121111| 5. Bug details: during fuzzing with Undefined-Behaviour sanitizer we've got the following report: |//src/factor.c:425:3: runtime error: shift exponent 64 is too large for 64-bit type 'uintmax_t' (aka 'unsigned long')     #0 0x56332975f862 in mod2 /home/artemiin/Work/crash_confirmation/coreutils/src/factor.c:425:3     #1 0x56332975ae54 in factor_using_pollard_rho2 coreutils/src/factor.c:1665:12     #2 0x563329750ab5 in factor  coreutils/src/factor.c:2246:9     #3 0x56332974eed6 in print_factors_single coreutils/src/factor.c:2454:3     #4 0x56332974dd4c in print_factors coreutils/src/factor.c:2506:11     #5 0x56332974d20d in main  coreutils/src/factor.c:2647:15     #6 0x7fa1933eb249 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16     #7 0x7fa1933eb304 in __libc_start_main csu/../csu/libc-start.c:360:3     #8 0x563329673630 in _start ( coreutils/src/factor+0x59630) (BuildId: 28b6f8b912cd8e99b886145a922476ec873a438b)/ /|     During analysis of this report, I found that there are some numbers, like 22222222222222222202111121111, which fall into the function mod2 and produce cnt=0.     I suppose that you expect lsh2(number, 0) == number (shift by zero should not change the number). But inside the realization of that macro, with cnt=0 we have an operation (d0) >> (64 - (cnt)) which stands for d0>>64. This is generally undefined behavior - on some systems, the number d0 remains unchanged (but is expected to be 0) and on other systems it can be zero.     So, generally, the result of this operation is undefined. Although the result is correct for the number 22222222222222222202111121111, it may not be true for other numbers or architectures. 6. Patch suggestion: I suggest just not to call lsh2 when cnt=0 to avoid this bug. My patch is in the attachment. Waiting for your reply, Best regards, Nasonov Artem -- C уважением, Артём Насонов Специалист по анализу безопасности Департамент анализа безопасности Отдел динамического анализа Эл. почта: anasonov@astralinux.ru ------------------------------------------------------------------------ Группа Астра Сайт: astragroup.ru Группа Астра --------------KbNBcmGZryrCTbV3GkPsiGn0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit To whom it may concern,

I’m writing to let you know that I found an issue by fuzzing in coreutils in factor utility and want to report it. Here are some details:

1. Host architecture: Host it Debian x86_64 architecture
2. factor version: factor (GNU coreutils) 9.5.94-5cecd
3. Affected code area: src/factor.c:425
4. Steps to reproduce:
    Working on commit: 5cecd703e57b2e1301767d82cbe5bb01cae88472

    export CC="clang-17"
    export CXX="clang++-17"
    export CFLAGS="-fsanitize=address,undefined -g"
    export LDFLAGS="-fsanitize=address,undefined -g"
    export UBSAN_OPTIONS=halt_on_error=1,abort_on_error=1,print_stacktrace=true,symbolize=true,print_stacktrace=1,report_error_type=1,symbolize=1
    ./bootstrap
    ./configure
    make
    ./src/factor 22222222222222222202111121111


5. Bug details: during fuzzing with Undefined-Behaviour sanitizer we've got the following report:

        src/factor.c:425:3: runtime error: shift exponent 64 is too large for 64-bit type 'uintmax_t' (aka 'unsigned long')
    #0 0x56332975f862 in mod2 /home/artemiin/Work/crash_confirmation/coreutils/src/factor.c:425:3
    #1 0x56332975ae54 in factor_using_pollard_rho2  coreutils/src/factor.c:1665:12
    #2 0x563329750ab5 in factor  coreutils/src/factor.c:2246:9
    #3 0x56332974eed6 in print_factors_single  coreutils/src/factor.c:2454:3
    #4 0x56332974dd4c in print_factors  coreutils/src/factor.c:2506:11
    #5 0x56332974d20d in main  coreutils/src/factor.c:2647:15
    #6 0x7fa1933eb249 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #7 0x7fa1933eb304 in __libc_start_main csu/../csu/libc-start.c:360:3
    #8 0x563329673630 in _start ( coreutils/src/factor+0x59630) (BuildId: 28b6f8b912cd8e99b886145a922476ec873a438b)
   
    During analysis of this report, I found that there are some numbers, like 22222222222222222202111121111, which fall into the function mod2 and produce cnt=0.
    I suppose that you expect lsh2(number, 0) == number (shift by zero should not change the number). But inside the realization of that macro, with cnt=0 we have an operation (d0) >> (64 - (cnt)) which stands for d0>>64. This is generally undefined behavior - on some systems, the number d0 remains unchanged (but is expected to be 0) and on other systems it can be zero.
    So, generally, the result of this operation is undefined. Although the result is correct for the number 22222222222222222202111121111, it may not be true for other numbers or architectures.

6. Patch suggestion: I suggest just not to call lsh2 when cnt=0 to avoid this bug. My patch is in the attachment.

Waiting for your reply,
Best regards,
Nasonov Artem
--

C уважением,
Артём Насонов
Специалист по анализу безопасности
Департамент анализа безопасности
Отдел динамического анализа

Эл. почта: anasonov@astralinux.ru

Группа Астра
Сайт: astragroup.ru

Группа Астра

--------------KbNBcmGZryrCTbV3GkPsiGn0-- --------------cXD7VeZuUN00AWnqTgYFdr0V Content-Type: text/x-patch; charset=UTF-8; name="factor.c.patch" Content-Disposition: attachment; filename="factor.c.patch" Content-Transfer-Encoding: base64 RnJvbSAwMTQ1MzFkYTIxYjljNTZhNGJjYTU5NjJkZGQwNzRjY2I3OTljOGRmIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBBcnRlbSBOYXNvbm92IDxhbmFzb25vdkBhc3RyYWxp bnV4LnJ1PgpEYXRlOiBXZWQsIDI1IFNlcCAyMDI0IDEzOjA2OjQ4ICswMzAwClN1YmplY3Q6 IFtQQVRDSF0gZmFjdG9yOiBmaXggdW5kZWZpbmVkIGJlaGF2aW91ciBpbnNpZGUgbW9kMiBm dW5jdGlvbgoKKiBzcmMvZmFjdG9yLmM6IEF2b2lkIGNhbGxpbmcgbHNoMiBtYWNybyB3aXRo IGNudD0wLCBiZWNhdXNlIG9mIHVuZGVmaW5lZC1iZWhhdmlvdXIgb3BlcmF0aW9uIGluc2lk ZSB0aGlzIG1hY3JvLiBXaXRoIGNudD0wIGQwIGlzIHNoaWZ0ZWQgNjQgYml0cyB0byB0aGUg cmlnaHQsIHdoaWNoIGlzIFVCLgotLS0KIHNyYy9mYWN0b3IuYyB8IDMgKystCiAxIGZpbGUg Y2hhbmdlZCwgMiBpbnNlcnRpb25zKCspLCAxIGRlbGV0aW9uKC0pCgpkaWZmIC0tZ2l0IGEv c3JjL2ZhY3Rvci5jIGIvc3JjL2ZhY3Rvci5jCmluZGV4IDI2NDllOWZjNi4uM2NmZjQ3NTA3 IDEwMDY0NAotLS0gYS9zcmMvZmFjdG9yLmMKKysrIGIvc3JjL2ZhY3Rvci5jCkBAIC00MjIs NyArNDIyLDggQEAgbW9kMiAodWludG1heF90ICpyMSwgdWludG1heF90IGExLCB1aW50bWF4 X3QgYTAsIHVpbnRtYXhfdCBkMSwgdWludG1heF90IGQwKQogICBjb3VudF9sZWFkaW5nX3pl cm9zIChjbnRkLCBkMSk7CiAgIGNvdW50X2xlYWRpbmdfemVyb3MgKGNudGEsIGExKTsKICAg aW50IGNudCA9IGNudGQgLSBjbnRhOwotICBsc2gyIChkMSwgZDAsIGQxLCBkMCwgY250KTsK KyAgaWYoY250KSAKKyAgICBsc2gyIChkMSwgZDAsIGQxLCBkMCwgY250KTsKICAgZm9yIChp bnQgaSA9IDA7IGkgPCBjbnQ7IGkrKykKICAgICB7CiAgICAgICBpZiAoZ2UyIChhMSwgYTAs IGQxLCBkMCkpCi0tIAoyLjM5LjIKCg== --------------cXD7VeZuUN00AWnqTgYFdr0V-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 11:16:20 2024 Received: (at 73474-done) by debbugs.gnu.org; 25 Sep 2024 15:16:21 +0000 Received: from localhost ([127.0.0.1]:42981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stTka-00022t-Gq for submit@debbugs.gnu.org; Wed, 25 Sep 2024 11:16:20 -0400 Received: from mail-lj1-f180.google.com ([209.85.208.180]:58706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stTkY-00022e-9s for 73474-done@debbugs.gnu.org; Wed, 25 Sep 2024 11:16:19 -0400 Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2f74e468aa8so73837931fa.1 for <73474-done@debbugs.gnu.org>; Wed, 25 Sep 2024 08:15:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727277286; x=1727882086; darn=debbugs.gnu.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:sender:from:to:cc:subject :date:message-id:reply-to; bh=a+YBifSsHCu/d7FOPdtJKjsYp4bOzF9/XR7kfClA2lc=; b=SBRtQslqteHfT0BOmSdfKMr2yQ26CX8IhOOZ4iwo13TRezBD+6jUs+KdPQuuMvo3ab i2u/TxT9u0QuHFZroQAYKXxPThAojLCdQujtEiZ2a6e5ctYkpc6gsg7FZHk1R+GzfpQW gcys094gcHLKDl+OHOdKktLNCePJCtR+QgHa0F9HDryZv46/oUvZNLy9PPc9WdW31dfZ qax6RXyUiqoO2YfrVRDDBsWtFNU4JNEBkbeeovtmufeyAp5G+jMjNSXLwyPDbNciv7bi RQyPZKM5t/8m2qLHA3jE7uDbAJSAcbLgBDQxWuxQZDUEYSA2aiT90qhD8kHMwB0YdO+0 YHBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727277286; x=1727882086; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=a+YBifSsHCu/d7FOPdtJKjsYp4bOzF9/XR7kfClA2lc=; b=Qg/hwW6tfU7bRQiLlA7X9ub3/faPg7I2hSgARXHEiNs90ab4MDfp8QmsgCuwgO8ter orvwNVzT3fveCvahGwqzog5Nk43U6BeEyWmUSq/zQ2E2sn6rzatcP5mlfh9SZKsXG+nf oVfCqHMJZwzgaqtk1hW6BQEuxrEY7QzaLQ0jIvBXKsR6efwpblKFb692cK10oq+s0sRz 8YxiLQRH9sLtnXWYRFrhKAiUcuB9e2HkrSD7AkrGvEsAmP/FAe49oqzpFKqsQc8LukM0 LftV1NoN6e7kh+p5ub2jscS2T22ODJf3HI3TyPfxX89G9fpxmly5U55QmZEZkFwB+bfy dEew== X-Forwarded-Encrypted: i=1; AJvYcCWjEQzvKLpfc2tUuZnJ8sIkCUDqLmheIay7c1K4wHS3doTPhQIwUzzWfGHTnkAmxhq5e4MHmZ7eDij/@debbugs.gnu.org X-Gm-Message-State: AOJu0YzA64f1NCx1Rr9NijQDWAjynCsEkHntS4YkdF/koGPg1IqxxWCz Tmc6knjHkwV+UDrYRo9PCRjUrHjONI6ME6U1puwXlsoEsrJK2IwN X-Google-Smtp-Source: AGHT+IFmS68Sp4XUsOAs3RCZM76YALed7xvsLCTXJs9iQgWz8lk1VChYBmVYa8zI4ypwfYFbklYhJg== X-Received: by 2002:a2e:b8d4:0:b0:2f7:4c9d:7a87 with SMTP id 38308e7fff4ca-2f91602f5demr22551921fa.21.1727277285476; Wed, 25 Sep 2024 08:14:45 -0700 (PDT) Received: from [192.168.1.76] (86-44-211-146-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.44.211.146]) by smtp.googlemail.com with ESMTPSA id 4fb4d7f45d1cf-5c5cf4973d0sm1979583a12.38.2024.09.25.08.14.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Sep 2024 08:14:44 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------s0aa4ey3XZ1K5xX0g92Z0G11" Message-ID: <48dac372-db3d-4d41-8929-1c5c845aa396@draigBrady.com> Date: Wed, 25 Sep 2024 16:14:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: bug#73474: Bug in factor utility of coreutils To: =?UTF-8?B?0JDRgNGC0LXQvCDQndCw0YHQvtC90L7Qsg==?= , 73474-done@debbugs.gnu.org References: <74983cb2-5af4-4d03-a823-c4581a34dfc0@astralinux.ru> Content-Language: en-US From: =?UTF-8?Q?P=C3=A1draig_Brady?= In-Reply-To: <74983cb2-5af4-4d03-a823-c4581a34dfc0@astralinux.ru> X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 73474-done Cc: =?UTF-8?B?0JLQuNC60YLQvtGA0LjRjyDQldCz0L7RgNC+0LLQsA==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) This is a multi-part message in MIME format. --------------s0aa4ey3XZ1K5xX0g92Z0G11 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 25/09/2024 11:26, Артем Насонов wrote: > To whom it may concern, > > I’m writing to let you know that I found an issue by fuzzing in > coreutils in *factor* utility and want to report it. Here are some details: > > 1. Host architecture: Host it Debian x86_64 architecture > 2. factor version: factor (GNU coreutils) 9.5.94-5cecd > 3. Affected code area: src/factor.c:425 > 4. Steps to reproduce: >     Working on commit: 5cecd703e57b2e1301767d82cbe5bb01cae88472 > > |    export CC="clang-17" >     export CXX="clang++-17" >     export CFLAGS="-fsanitize=address,undefined -g" >     export LDFLAGS="-fsanitize=address,undefined -g" >     export > UBSAN_OPTIONS=halt_on_error=1,abort_on_error=1,print_stacktrace=true,symbolize=true,print_stacktrace=1,report_error_type=1,symbolize=1 >     ./bootstrap >     ./configure >     make >     ./src/factor 22222222222222222202111121111| > > 5. Bug details: during fuzzing with Undefined-Behaviour sanitizer we've > got the following report: > > |//src/factor.c:425:3: runtime error: shift exponent 64 is too large for > 64-bit type 'uintmax_t' (aka 'unsigned long') >     #0 0x56332975f862 in mod2 > /home/artemiin/Work/crash_confirmation/coreutils/src/factor.c:425:3 >     #1 0x56332975ae54 in factor_using_pollard_rho2 > coreutils/src/factor.c:1665:12 >     #2 0x563329750ab5 in factor  coreutils/src/factor.c:2246:9 >     #3 0x56332974eed6 in print_factors_single coreutils/src/factor.c:2454:3 >     #4 0x56332974dd4c in print_factors coreutils/src/factor.c:2506:11 >     #5 0x56332974d20d in main  coreutils/src/factor.c:2647:15 >     #6 0x7fa1933eb249 in __libc_start_call_main > csu/../sysdeps/nptl/libc_start_call_main.h:58:16 >     #7 0x7fa1933eb304 in __libc_start_main csu/../csu/libc-start.c:360:3 >     #8 0x563329673630 in _start ( coreutils/src/factor+0x59630) > (BuildId: 28b6f8b912cd8e99b886145a922476ec873a438b)/ > /| >     During analysis of this report, I found that there are some > numbers, like 22222222222222222202111121111, which fall into the > function mod2 and produce cnt=0. >     I suppose that you expect lsh2(number, 0) == number (shift by zero > should not change the number). But inside the realization of that macro, > with cnt=0 we have an operation (d0) >> (64 - (cnt)) which stands for > d0>>64. This is generally undefined behavior - on some systems, the > number d0 remains unchanged (but is expected to be 0) and on other > systems it can be zero. >     So, generally, the result of this operation is undefined. Although > the result is correct for the number 22222222222222222202111121111, it > may not be true for other numbers or architectures. > > 6. Patch suggestion: I suggest just not to call lsh2 when cnt=0 to avoid > this bug. My patch is in the attachment. > > Waiting for your reply, > Best regards, > Nasonov Artem Nice one! It seems better to move the checks within the macro to avoid any future issues. I've also applied the same check to rsh2 in the attached. I'll apply the attached later. Marking this as done. thanks! Pádraig --------------s0aa4ey3XZ1K5xX0g92Z0G11 Content-Type: text/x-patch; charset=UTF-8; name="factor-undefined-shifts.diff" Content-Disposition: attachment; filename="factor-undefined-shifts.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3NyYy9mYWN0b3IuYyBiL3NyYy9mYWN0b3IuYwppbmRleCAyNjQ5ZTlm YzYuLjgwMmMwNWU0ZiAxMDA2NDQKLS0tIGEvc3JjL2ZhY3Rvci5jCisrKyBiL3NyYy9mYWN0 b3IuYwpAQCAtMzE4LDE2ICszMTgsMTYgQEAgc3RhdGljIHZvaWQgZmFjdG9yICh1aW50bWF4 X3QsIHVpbnRtYXhfdCwgc3RydWN0IGZhY3RvcnMgKik7CiAjZW5kaWYKIAogI2RlZmluZSBy c2gyKHJoLCBybCwgYWgsIGFsLCBjbnQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgXAotICBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICBpZiAoY250KSB7ICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAog ICAgIChybCkgPSAoKGFoKSA8PCAoV19UWVBFX1NJWkUgLSAoY250KSkpIHwgKChhbCkgPj4g KGNudCkpOyAgICAgICAgICAgXAogICAgIChyaCkgPSAoYWgpID4+IChjbnQpOyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICB9IHdoaWxlICgw KQorICB9IGVsc2UgKHZvaWQpIDAKIAogI2RlZmluZSBsc2gyKHJoLCBybCwgYWgsIGFsLCBj bnQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICBkbyB7ICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgXAorICBpZiAoY250KSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgIChyaCkgPSAoKGFoKSA8PCBj bnQpIHwgKChhbCkgPj4gKFdfVFlQRV9TSVpFIC0gKGNudCkpKTsgICAgICAgICAgICAgXAog ICAgIChybCkgPSAoYWwpIDw8IChjbnQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgXAotICB9IHdoaWxlICgwKQorICB9IGVsc2UgKHZvaWQpIDAK IAogI2RlZmluZSBnZTIoYWgsIGFsLCBiaCwgYmwpICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgXAogICAoKGFoKSA+IChiaCkgfHwgKChhaCkgPT0gKGJo KSAmJiAoYWwpID49IChibCkpKQo= --------------s0aa4ey3XZ1K5xX0g92Z0G11-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 16:10:15 2024 Received: (at 73474) by debbugs.gnu.org; 25 Sep 2024 20:10:15 +0000 Received: from localhost ([127.0.0.1]:52077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stYL0-0005x9-J9 for submit@debbugs.gnu.org; Wed, 25 Sep 2024 16:10:15 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:59736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stY7V-00054z-HB for 73474@debbugs.gnu.org; Wed, 25 Sep 2024 15:56:18 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 232E43C00FA97; Wed, 25 Sep 2024 12:55:45 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id rKTIdijnBryq; Wed, 25 Sep 2024 12:55:44 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id BBF223C00FA98; Wed, 25 Sep 2024 12:55:44 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu BBF223C00FA98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1727294144; bh=tPdHBlac4HR0WzxFbWAfr8JoY73NGdK+MndCn9tN9uw=; h=Message-ID:Date:MIME-Version:To:From; b=gLyuDkZ/LaUmGYoQ+NYOIaioh1JmYQbJMExGQW4VbU+padXOdvpgDJ/2TZn440HIL Oo8hk3baEycwnwH7yuEfmyidiAvxYXfna0018oTx793G+CS9ckZi8/zbsJMzNKxnEU Y3V6cJiRBcYI1We2pqqg1TwJrlGlZuiFBrumYMOR+e3o+Or+lFyH/tgggvQ2sqH89l QhSaHE4DMgoCwYBRdRMkpUZ/EcIuteh7fXrD7C+ZmE1fI/+b8S66IUCfmGAsfvnkEq EHUUvcQBHCRjwM7xT5zybAa7jWvyags/gq2uekOFLC1BbJdZrh0ibrPeZUB79aINPP Z9AVlG2VETeRA== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id YIlu8Tm1LgIy; Wed, 25 Sep 2024 12:55:44 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.150.137.250]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 9FEA53C00FA97; Wed, 25 Sep 2024 12:55:44 -0700 (PDT) Message-ID: Date: Wed, 25 Sep 2024 12:55:44 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#73474: Bug in factor utility of coreutils To: 73474@debbugs.gnu.org, P@draigBrady.com, anasonov@astralinux.ru References: <74983cb2-5af4-4d03-a823-c4581a34dfc0@astralinux.ru> <48dac372-db3d-4d41-8929-1c5c845aa396@draigBrady.com> Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <48dac372-db3d-4d41-8929-1c5c845aa396@draigBrady.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 73474 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2024-09-25 08:14, P=C3=A1draig Brady wrote: > It seems better to move the checks within the macro to avoid any future= =20 > issues. > I've also applied the same check to rsh2 in the attached. That patch doesn't suffice (nor does Artem's) because the count can be=20 negative. I'll take a further look at this. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 25 16:56:51 2024 Received: (at 73474) by debbugs.gnu.org; 25 Sep 2024 20:56:51 +0000 Received: from localhost ([127.0.0.1]:54619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stZ46-0000yM-FW for submit@debbugs.gnu.org; Wed, 25 Sep 2024 16:56:50 -0400 Received: from mail-wm1-f53.google.com ([209.85.128.53]:48237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1stZ44-0000xw-Hf for 73474@debbugs.gnu.org; Wed, 25 Sep 2024 16:56:49 -0400 Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-42cb9a0c300so2073295e9.0 for <73474@debbugs.gnu.org>; Wed, 25 Sep 2024 13:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727297716; x=1727902516; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=ewR9WHlB02BmDsobdmW+Z8+39fCAzoOqU+IpqpzvjIw=; b=TtgN9KAExC+mEVL0aRwc5wST9gL+DJmfXIGj0AGYj7Qks5y/JHw1m8N1zg0wawkp0g 43fZSJ93s84mDYo94wKOCB36YCnOKMNF37TD9Sjda4fq/i0l6+MehojgkwDqIsSA2b1P VYsH96dwRC6TUW2cAbJoFru4w0nTljyj8Vusjn+50atex42e4/XNOl2cWO61nPG6wheP dxG6hOzMbsErqCR2FLORwfTxQtsfHPi8zygIsNBgbUe9HdLFGF1Y70/9QK1gWyjRzJpI AVbovXGrMEyj4B0clcbCHefBWGmu1vJwAd5e44zyntcDjiX0bXoOm4PanzUXSs5UYUz/ QLew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727297716; x=1727902516; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ewR9WHlB02BmDsobdmW+Z8+39fCAzoOqU+IpqpzvjIw=; b=hBFmqCVBsVVdWrl/lqXLGF236f+LbqwKVfs8lL2vZN8sR6xaQsj+/5Ef+5uB4jLNi1 k07NGulQSeFfI3tcggS2aPfOt8uKN/dkMgLjGS/M/rbtGdYnnWjfH0m0p3zAZ8yZhuSg 3PZqcefPMrDqFJ1gp8cdvI5hZXen5jhuVIJpV/safr3mBUH/GDWfXxYvFqgYsL0J15SE L7On+nJHsJ2SglCQL5J6r2BdbGgeAXEfYJFqQ4G6zYHrQWwfh7SFQkl6X7M4rRbgWPO6 22db7KK+ogH9Vwfy1LDfrqocrRem/jPo4+6yDHcV7fR/HDwN6OccrVrR5mDOoZnIExcG 3kKA== X-Forwarded-Encrypted: i=1; AJvYcCXRhmTzISkBECUJt8S3DhV1VI1cNH0Q+bn4OjwIrsoIdrC50PJcHxRU+RmlJz4jBx7j24Hhiw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzYE3uYyrHE2WzLzCyoBytq8dfBIDx3jX22bpKKZOto8j5h9rvd QFV0dA18Eqv3lRfHFr0sRyuFHA8Ckuuxg1y4HqJifiCi1NC3ZK6cBA3/qQ== X-Google-Smtp-Source: AGHT+IFG2sPZNIfGW5kEmIvlIuwk4QvB+E8xtuT5PyGhQ65aNinuF0CqZCpeEDQeDpGc0nQaw8WG5w== X-Received: by 2002:a17:906:bc13:b0:a86:97e5:8d4e with SMTP id a640c23a62f3a-a93a036901fmr364419766b.23.1727297332105; Wed, 25 Sep 2024 13:48:52 -0700 (PDT) Received: from [192.168.1.76] (86-44-211-146-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.44.211.146]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a9392f50b26sm259318266b.61.2024.09.25.13.48.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Sep 2024 13:48:51 -0700 (PDT) Message-ID: <1424bcf8-94df-4252-8cb9-23cc2ba19733@draigBrady.com> Date: Wed, 25 Sep 2024 21:48:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: bug#73474: Bug in factor utility of coreutils To: Paul Eggert , 73474@debbugs.gnu.org, anasonov@astralinux.ru References: <74983cb2-5af4-4d03-a823-c4581a34dfc0@astralinux.ru> <48dac372-db3d-4d41-8929-1c5c845aa396@draigBrady.com> Content-Language: en-US From: =?UTF-8?Q?P=C3=A1draig_Brady?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 73474 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On 25/09/2024 20:55, Paul Eggert wrote: > On 2024-09-25 08:14, Pádraig Brady wrote: >> It seems better to move the checks within the macro to avoid any future >> issues. >> I've also applied the same check to rsh2 in the attached. > > That patch doesn't suffice (nor does Artem's) because the count can be > negative. I'll take a further look at this. Indeed. I had already added asserts just in case, and hit: $ src/factor 79228162514264337593543941441 factor: src/factor.c:427: mod2: Assertion `0 < cnt' failed. Aborted (core dumped) Note factor does give the correct result on amd64 at least without the asserts: $ factor 79228162514264337593543941441 | sed 's/.*: //; s/ /*/g' | bc 79228162514264337593543941441 cheers, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 27 20:51:32 2024 Received: (at 73474-done) by debbugs.gnu.org; 28 Sep 2024 00:51:32 +0000 Received: from localhost ([127.0.0.1]:32844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suLgK-00077u-0I for submit@debbugs.gnu.org; Fri, 27 Sep 2024 20:51:32 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:51798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1suLgG-00077c-Hr for 73474-done@debbugs.gnu.org; Fri, 27 Sep 2024 20:51:30 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id A8CC83C011BD7; Fri, 27 Sep 2024 17:50:52 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id SKLK7Bg6UnH3; Fri, 27 Sep 2024 17:50:52 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 1E4A43C011BD8; Fri, 27 Sep 2024 17:50:52 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 1E4A43C011BD8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1727484652; bh=a7S6Kh4nB8iDAYz5iKiBUZyN04yvLSTWVB+Gh2hSOow=; h=Message-ID:Date:MIME-Version:To:From; b=AzKgVriT4VjIl9Ryuk05ZSd/h9Noe4zDIjoQSCvXSpGuYseyQ3DG4qQgY9owWzIP4 socu4TY5iyk2BoMrjjSQHbhoEl2Wrvv5j05C1N93nX2HWijki/AChSjvdW5oA42ZJj iitZDC0eW7NmynFYndAf0x+Est5Smh7AuwMUvb5gAPFs31WhwEUNNOckajmU7tkYr7 3R9Y60aN+2wlKRA9nQB2MIDGaq1EfRAy+cEqZCo2H3/sn99CytfUwh7iCz1Yk/w7OI +r3X+Xh0jvZymeNnpRFGnFQYIMWLsC1RdUyTmjXIXuj6512fAoxZaly+Tm5AK29ChB 27XESqkjCzesw== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id RRAQ2y4lsy98; Fri, 27 Sep 2024 17:50:52 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.150.137.250]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id ED5443C011BD7; Fri, 27 Sep 2024 17:50:51 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------LHliMd9Cd2OrgnNC5GtSatBo" Message-ID: Date: Fri, 27 Sep 2024 17:50:51 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#73474: Bug in factor utility of coreutils To: =?UTF-8?Q?P=C3=A1draig_Brady?= , anasonov@astralinux.ru References: <74983cb2-5af4-4d03-a823-c4581a34dfc0@astralinux.ru> <48dac372-db3d-4d41-8929-1c5c845aa396@draigBrady.com> <1424bcf8-94df-4252-8cb9-23cc2ba19733@draigBrady.com> Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <1424bcf8-94df-4252-8cb9-23cc2ba19733@draigBrady.com> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 73474-done Cc: 73474-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is a multi-part message in MIME format. --------------LHliMd9Cd2OrgnNC5GtSatBo Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 2024-09-25 13:48, P=C3=A1draig Brady wrote: >=20 > Note factor does give the correct result on amd64 at least > without the asserts: Yes, as far as I know the existing code works correctly on all practical=20 platforms. It's only pedantic/checking platforms, where shifts by=20 negative or by too-large result in crashes or diagnostics, where the=20 existing code fails. The bug is easy to fix and the fixdoesn't hurt performance=20 significantly, so I installed the attached. Closing the bug report. While looking into this I got seduced by the prospect of making 'factor'=20 a bit better (e.g., eliminate some recursion and fix some buffering=20 issues) and installed a bunch of followup patches for 'factor'. Yeah,=20 yeah, I should know better.... --------------LHliMd9Cd2OrgnNC5GtSatBo Content-Type: text/x-patch; charset=UTF-8; name="0001-factor-port-to-platforms.patch" Content-Disposition: attachment; filename="0001-factor-port-to-platforms.patch" Content-Transfer-Encoding: base64 RnJvbSA1ODY3NDY1NTEwZDAyM2VjZTQyMGU5OTIxZmMxMDM0ZTNhYmQ2NDU1IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBXZWQsIDI1IFNlcCAyMDI0IDE1OjU5OjA5IC0wNzAwClN1YmplY3Q6IFtQQVRD SF0gZmFjdG9yOiBwb3J0IHRvIHBsYXRmb3JtcwoKKiBzcmMvZmFjdG9yLmMgKG1vZDIpOiBX b3JrIGV2ZW4gaWYgY250ZCA8PSBjbnRhLiAgVGhlIG9sZCB2ZXJzaW9uCm9mIHRoZSBjb2Rl IGFzc3VtZWQgdGhhdCBzaGlmdHMgYnkgTiBoYWQgdW5zcGVjaWZpZWQgYmVoYXZpb3IKdW5s ZXNzIDAgPD0gTiA8IHdvcmRzaXplLiAgQWx0aG91Z2ggdGhpcyBhc3N1bXB0aW9uIGlzIHBv cnRhYmxlIHRvCmFsbCBrbm93biBwcmFjdGljYWwgcGxhdGZvcm1zLCB0aGUgQyBzdGFuZGFy ZCBzYXlzIHRoZXNlIHNoaWZ0cwpoYXZlIHVuZGVmaW5lZCBiZWhhdmlvciBhbmQgc29tZSBw ZWRhbnRpYyBwbGF0Zm9ybXMgY2hlY2sgdGhpcy4KKiB0ZXN0cy9mYWN0b3IvY3JlYXRlLXRl c3Quc2g6CiogdGVzdHMvbG9jYWwubWsgKGZhY3Rvcl90ZXN0cyk6IE5ldyB0ZXN0IHQzNy4K LS0tCiBzcmMvZmFjdG9yLmMgICAgICAgICAgICAgICAgfCAxNSArKysrKysrKysrLS0tLS0K IHRlc3RzL2ZhY3Rvci9jcmVhdGUtdGVzdC5zaCB8ICA0ICsrKysKIHRlc3RzL2xvY2FsLm1r ICAgICAgICAgICAgICB8ICAyICstCiAzIGZpbGVzIGNoYW5nZWQsIDE1IGluc2VydGlvbnMo KyksIDYgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvc3JjL2ZhY3Rvci5jIGIvc3JjL2Zh Y3Rvci5jCmluZGV4IDI2NDllOWZjNi4uZjRkZDZmNmQ0IDEwMDY0NAotLS0gYS9zcmMvZmFj dG9yLmMKKysrIGIvc3JjL2ZhY3Rvci5jCkBAIC0zMTcsMTIgKzMxNywxNCBAQCBzdGF0aWMg dm9pZCBmYWN0b3IgKHVpbnRtYXhfdCwgdWludG1heF90LCBzdHJ1Y3QgZmFjdG9ycyAqKTsK ICAgfSB3aGlsZSAoMCkKICNlbmRpZgogCisvKiBTZXQgKHJoLHJsKSA9IChhaCxhbCkgPj4g Y250LCB3aGVyZSAwIDwgY250IDwgV19UWVBFX1NJWkUuICAqLwogI2RlZmluZSByc2gyKHJo LCBybCwgYWgsIGFsLCBjbnQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgXAogICBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgIChybCkgPSAoKGFoKSA8PCAoV19UWVBF X1NJWkUgLSAoY250KSkpIHwgKChhbCkgPj4gKGNudCkpOyAgICAgICAgICAgXAogICAgIChy aCkgPSAoYWgpID4+IChjbnQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgXAogICB9IHdoaWxlICgwKQogCisvKiBTZXQgKHJoLHJsKSA9IChhaCxh bCkgPDwgY250LCB3aGVyZSAwIDwgY250IDwgV19UWVBFX1NJWkUuICAqLwogI2RlZmluZSBs c2gyKHJoLCBybCwgYWgsIGFsLCBjbnQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgXAogICBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgIChyaCkgPSAoKGFoKSA8PCBj bnQpIHwgKChhbCkgPj4gKFdfVFlQRV9TSVpFIC0gKGNudCkpKTsgICAgICAgICAgICAgXApA QCAtNDIyLDEyICs0MjQsMTUgQEAgbW9kMiAodWludG1heF90ICpyMSwgdWludG1heF90IGEx LCB1aW50bWF4X3QgYTAsIHVpbnRtYXhfdCBkMSwgdWludG1heF90IGQwKQogICBjb3VudF9s ZWFkaW5nX3plcm9zIChjbnRkLCBkMSk7CiAgIGNvdW50X2xlYWRpbmdfemVyb3MgKGNudGEs IGExKTsKICAgaW50IGNudCA9IGNudGQgLSBjbnRhOwotICBsc2gyIChkMSwgZDAsIGQxLCBk MCwgY250KTsKLSAgZm9yIChpbnQgaSA9IDA7IGkgPCBjbnQ7IGkrKykKKyAgaWYgKDAgPCBj bnQpCiAgICAgewotICAgICAgaWYgKGdlMiAoYTEsIGEwLCBkMSwgZDApKQotICAgICAgICBz dWJfZGRtbXNzIChhMSwgYTAsIGExLCBhMCwgZDEsIGQwKTsKLSAgICAgIHJzaDIgKGQxLCBk MCwgZDEsIGQwLCAxKTsKKyAgICAgIGxzaDIgKGQxLCBkMCwgZDEsIGQwLCBjbnQpOworICAg ICAgZm9yIChpbnQgaSA9IDA7IGkgPCBjbnQ7IGkrKykKKyAgICAgICAgeworICAgICAgICAg IGlmIChnZTIgKGExLCBhMCwgZDEsIGQwKSkKKyAgICAgICAgICAgIHN1Yl9kZG1tc3MgKGEx LCBhMCwgYTEsIGEwLCBkMSwgZDApOworICAgICAgICAgIHJzaDIgKGQxLCBkMCwgZDEsIGQw LCAxKTsKKyAgICAgICAgfQogICAgIH0KIAogICAqcjEgPSBhMTsKZGlmZiAtLWdpdCBhL3Rl c3RzL2ZhY3Rvci9jcmVhdGUtdGVzdC5zaCBiL3Rlc3RzL2ZhY3Rvci9jcmVhdGUtdGVzdC5z aAppbmRleCBlZGE1MmY4OWMuLjJkNTg3YzBkOSAxMDA3NTUKLS0tIGEvdGVzdHMvZmFjdG9y L2NyZWF0ZS10ZXN0LnNoCisrKyBiL3Rlc3RzL2ZhY3Rvci9jcmVhdGUtdGVzdC5zaApAQCAt MjQsNiArMjQsOSBAQCB0Mj0xNzAxNDExODM0NjA0NjkyMjk1NDU3NDgxMzA5ODEzMDIyMjM4 ODcKICMgdDE6IDkyMjMzNzIwMzY4NTQ3NzU0MjEgMTg0NDY3NDQwNzM3MDk1NTE3MDkKICMg dDI6IDkyMjMzNzIwMzY4NTQ3NzU2NDMgMTg0NDY3NDQwNzM3MDk1NTE3MDkKIAorIyBodHRw czovL2J1Z3MuZ251Lm9yZy83MzQ3NAorYnVnNzM0NzQ9MjIyMjIyMjIyMjIyMjIyMjIyMDIx MTExMjExMTEKKwogIyBFYWNoIHRlc3QgaXMgYSB0cmlwbGU6IGxvLCBoaSwgc2hhMSBvZiBy ZXN1bHQuCiAjIFRoZSB0ZXN0IHNjcmlwdCwgcnVuLnNoLCBydW5zIHNlcSBsbyBoaXxmYWN0 b3J8c2hhMXN1bQogIyBhbmQgdmVyaWZpZXMgdGhhdCB0aGUgYWN0dWFsIGFuZCBleHBlY3Rl ZCBjaGVja3N1bXMgYXJlIHRoZSBzYW1lLgpAQCAtNjYsNiArNjksNyBAQCBjYXNlICR0IGlu CiAgIHQzNCkgc2V0ICAgJHtxfTk1NjMzNiAgICR7cX05NTgzMzUgZDFhZTZiYzcxMmQ5OTRm MzVlZGY1NWM3ODVkNzFkZGYzMWYxNjUzNSA7OwogICB0MzUpIHNldCAgICR7cX05NTgzMzYg ICAke3F9OTYwMzM1IDIzNzQ5MTlhODkxOTZlMWZjZTkzYWRmZTc3OWNiNDY2NDU1NmQ0YjYg OzsKICAgdDM2KSBzZXQgICAke3F9OTYwMzM2ICAgJHtxfTk2MjMzNSA1NjllNDM2M2U4ZDll ODgzMGExODdkOWFiMjczNjVlZWYwOGFiZGUxIDs7CisgIHQzNykgc2V0ICAgICRidWc3MzQ3 NCAgICAkYnVnNzM0NzQgNjFkMDRhYWY3NTdhY2M1YTM3ZWIxZDU1ODFhOThlZWE3OGVmNTBl OCA7OwogICAqKQogICAgIGVjaG8gIiQwOiBlcnJvcjogdW5rbm93biB0ZXN0OiAnJHRlc3Rf bmFtZScgLT4gJyR0JyIgPiYyCiAgICAgZXhpdCAxCmRpZmYgLS1naXQgYS90ZXN0cy9sb2Nh bC5tayBiL3Rlc3RzL2xvY2FsLm1rCmluZGV4IGY3MjM1Mzg2Mi4uMmI4ODU3OThhIDEwMDY0 NAotLS0gYS90ZXN0cy9sb2NhbC5taworKysgYi90ZXN0cy9sb2NhbC5tawpAQCAtNzU5LDcg Kzc1OSw3IEBAIGZhY3Rvcl90ZXN0cyA9IFwKICAgJCh0ZikvdDIwLnNoICQodGYpL3QyMS5z aCAkKHRmKS90MjIuc2ggJCh0ZikvdDIzLnNoICQodGYpL3QyNC5zaCBcCiAgICQodGYpL3Qy NS5zaCAkKHRmKS90MjYuc2ggJCh0ZikvdDI3LnNoICQodGYpL3QyOC5zaCAkKHRmKS90Mjku c2ggXAogICAkKHRmKS90MzAuc2ggJCh0ZikvdDMxLnNoICQodGYpL3QzMi5zaCAkKHRmKS90 MzMuc2ggJCh0ZikvdDM0LnNoIFwKLSAgJCh0ZikvdDM1LnNoICQodGYpL3QzNi5zaAorICAk KHRmKS90MzUuc2ggJCh0ZikvdDM2LnNoICQodGYpL3QzNy5zaAogCiAkKGZhY3Rvcl90ZXN0 cyk6ICQodGYpL3J1bi5zaCAkKHRmKS9jcmVhdGUtdGVzdC5zaAogCSQoQU1fVl9HRU4pJChN S0RJUl9QKSAkKHRmKQotLSAKMi40My4wCgo= --------------LHliMd9Cd2OrgnNC5GtSatBo-- From unknown Sat Jun 21 10:38:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 26 Oct 2024 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator