From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 159823858D28 for ; Thu, 26 Jan 2023 20:54:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 159823858D28 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com X-ASG-Debug-ID: 1674766447-0c856e762b7a3a10001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id OtrQV9bvZpLtpPHx (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO); Thu, 26 Jan 2023 15:54:07 -0500 (EST) X-Barracuda-Envelope-From: simon.marchi@efficios.com X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from smarchi-efficios.internal.efficios.com (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtp.ebox.ca (Postfix) with ESMTP id 298AA441D64; Thu, 26 Jan 2023 15:54:07 -0500 (EST) From: Simon Marchi X-Barracuda-RBL-IP: 192.222.180.24 X-Barracuda-Effective-Source-IP: 192-222-180-24.qc.cable.ebox.net[192.222.180.24] X-Barracuda-Apparent-Source-IP: 192.222.180.24 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [pushed] gdb/testsuite: initialize "correct" variable in gdb.cp/cpexprs.exp.tcl Date: Thu, 26 Jan 2023 15:54:06 -0500 X-ASG-Orig-Subj: [pushed] gdb/testsuite: initialize "correct" variable in gdb.cp/cpexprs.exp.tcl Message-Id: <20230126205406.59640-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1674766447 X-Barracuda-Encrypted: AES128-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 1166 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.103907 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Spam-Status: No, score=-3498.1 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Due to a GDB bug (visible when building with -D_GLIBCXX_DEBUG), GDB crashes somewhere in the middle of gdb.cp/cpexprs.exp, and thus fails to read the string, at gdb.cp/cpexprs.exp.tcl:725. The "correct" variable doesn't get set, and I then see this TCL error: ERROR: can't read "correct": no such variable Avoid the TCL error by initializing the "correct" variable to a dummy value. Change-Id: I828968d9b2d105ef47f8da2ef598aa16a518c059 --- gdb/testsuite/gdb.cp/cpexprs.exp.tcl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/testsuite/gdb.cp/cpexprs.exp.tcl b/gdb/testsuite/gdb.cp/cpexprs.exp.tcl index 3df149bf6a3e..462cf16dcd1c 100644 --- a/gdb/testsuite/gdb.cp/cpexprs.exp.tcl +++ b/gdb/testsuite/gdb.cp/cpexprs.exp.tcl @@ -722,6 +722,8 @@ foreach name [get_functions list] { # Test c/v gets recognized even without quoting. foreach cv {{} { const} { volatile} { const volatile}} { set test "p 'CV::m(int)$cv'" + set correct dummy_value + gdb_test_multiple $test $test { -re "( = {.*} 0x\[0-9a-f\]+ )\r\n$gdb_prompt $" { # = {void (CV * const, CV::t)} 0x400944 -- 2.39.1