From nobody Sat May 14 15:31:02 2022 X-Original-To: toolchain@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4CA631AD1B5B for ; Sat, 14 May 2022 15:31:13 +0000 (UTC) (envelope-from pjfloyd@wanadoo.fr) Received: from smtp.smtpout.orange.fr (smtp09.smtpout.orange.fr [80.12.242.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L0qH41s1yz4vr1 for ; Sat, 14 May 2022 15:31:12 +0000 (UTC) (envelope-from pjfloyd@wanadoo.fr) Received: from [192.168.1.28] ([2.7.225.93]) by smtp.orange.fr with ESMTPA id ptjTnwapgqoKwptjTng231; Sat, 14 May 2022 17:31:04 +0200 X-ME-Helo: [192.168.1.28] X-ME-Auth: ZDI4MDf1ZGZiZWFmNzI5NTEzODk4OGE2ODcyMiNiNDM1OTAw X-ME-Date: Sat, 14 May 2022 17:31:04 +0200 X-ME-IP: 2.7.225.93 Message-ID: Date: Sat, 14 May 2022 17:31:02 +0200 List-Id: Maintenance of FreeBSD s integrated toolchain List-Archive: https://lists.freebsd.org/archives/freebsd-toolchain List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 To: "toolchain@freebsd.org" Content-Language: en-US From: Paul Floyd Subject: locked instruction testcase failure Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4L0qH41s1yz4vr1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pjfloyd@wanadoo.fr designates 80.12.242.131 as permitted sender) smtp.mailfrom=pjfloyd@wanadoo.fr X-Spamd-Result: default: False [-2.25 / 15.00]; RCVD_TLS_LAST(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[wanadoo.fr]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:80.12.242.128/29]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-0.996]; RECEIVED_SPAMHAUS_PBL(0.00)[2.7.225.93:received]; DMARC_NA(0.00)[wanadoo.fr]; NEURAL_SPAM_SHORT(0.05)[0.046]; RCVD_IN_DNSWL_NONE(0.00)[80.12.242.131:from]; TO_DN_EQ_ADDR_ALL(0.00)[]; MLMMJ_DEST(0.00)[toolchain]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:3215, ipnet:80.12.240.0/20, country:FR]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[wanadoo.fr]; RWL_MAILSPIKE_POSSIBLE(0.00)[80.12.242.131:from] X-ThisMailContainsUnwantedMimeParts: N Hi I'm working on updating Valgrind for FreeBSD 13.1. One of the problems that I see is with the testcase none/tests/amd64/amd64locked Here's a link to the source https://sourceware.org/git/?p=valgrind.git;a=blob;f=none/tests/amd64/amd64locked.c;h=baf9bbe1eca91ac672e4373d8f58a476cf4de9d5;hb=HEAD The problem is nor related to Valgrind. If I run the executable alone it fails $ ./amd64locked amd64locked: FAIL: CRCs actual 0xA248D739 expected 0xDF0656F1 amd64locked: set #define VERBOSE 1 to diagnose This is on FreeBSD 13.1 RC6 amd64 running on VirtualBox, compiler version FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303) I'm not familiar with the code. It's a long test for all amd64 instructions with a lock prefix performing CRC calculations. Compiled without optimization it passes The source contains this comment   // So there should be 118 lock-prefixed instructions in the   // disassembly of this compilation unit.   // confirm with   // objdump -d ./amd64locked | grep lock | grep -v do_lock | grep -v elf64 | wc This also gives the wrong output.  $  objdump -d ./amd64locked | grep lock | grep -v do_lock | grep -v elf64 | wc      136    1193    7376 I'll check what this does on Linux. Any suggestions what can be done? It looks like an issue with the compiler. A+ Paul