From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69580 invoked by alias); 1 Dec 2015 16:33:44 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 69570 invoked by uid 89); 1 Dec 2015 16:33:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,GARBLED_BODY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 01 Dec 2015 16:33:42 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 995FF113716; Tue, 1 Dec 2015 16:33:41 +0000 (UTC) Received: from t540p.usersys.redhat.com (vpn-62-185.rdu2.redhat.com [10.10.62.185]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB1GXdUn014602 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Dec 2015 11:33:40 -0500 Subject: Re: [PATCH 1/2] rewrite the case typemismatch To: =?UTF-8?B?WmhvdSwgV2Vuamlhbi/lkajmlofliZE=?= References: <1448935063-2946-1-git-send-email-zhouwj-fnst@cn.fujitsu.com> <565D10BB.8000103@cn.fujitsu.com> Cc: systemtap@sourceware.org From: David Smith Message-ID: <565DCBE3.4090701@redhat.com> Date: Tue, 01 Dec 2015 16:33:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <565D10BB.8000103@cn.fujitsu.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2015-q4/txt/msg00218.txt.bz2 On 11/30/2015 09:15 PM, "Zhou, Wenjian/周文剑" wrote: > Hello David, > > I will describe the bug in typemismatch in the following. > > On 12/01/2015 09:57 AM, Zhou Wenjian wrote: >> * testsuite/semko/typemismatch.stp: use the following cases to >> replace it >> >> * testsuite/semko/typemismatch1.stp >> * testsuite/semko/typemismatch2.stp >> * testsuite/semko/typemismatch3.stp >> --- >> testsuite/semko/typemismatch.stp | 8 -------- >> testsuite/semko/typemismatch1.stp | 8 ++++++++ >> testsuite/semko/typemismatch2.stp | 4 ++++ >> testsuite/semko/typemismatch3.stp | 3 +++ >> 4 files changed, 15 insertions(+), 8 deletions(-) >> delete mode 100755 testsuite/semko/typemismatch.stp >> create mode 100755 testsuite/semko/typemismatch1.stp >> create mode 100755 testsuite/semko/typemismatch2.stp >> create mode 100755 testsuite/semko/typemismatch3.stp >> >> diff --git a/testsuite/semko/typemismatch.stp >> b/testsuite/semko/typemismatch.stp >> deleted file mode 100755 >> index 94a49d5..0000000 >> --- a/testsuite/semko/typemismatch.stp >> +++ /dev/null >> @@ -1,8 +0,0 @@ >> -#! stap -p2 >> - >> - >> -global noo >> - >> -probe begin { foo = 1 ; foo = "bar" ; noo = 4 } >> - >> -probe end { foo = "zoo" ; foo <<< 2 ; noo = "zoo" } > > The 'foo = 1; foo = "bar";' and 'foo = "zoo" ; foo <<< 2;' will just > cause some warnings, > and won't cause error. Hmm, if you are only seeing warnings there and not an error, something is wrong. Here's what I get: ==== # stap -p2 testsuite/semko/typemismatch.stp WARNING: Eliding assignment to 'foo': operator '=' at testsuite/semko/typemismatch.stp:6:19 source: probe begin { foo = 1 ; foo = "bar" ; noo = 4 } ^ WARNING: Eliding side-effect-free expression : identifier 'foo' at :6:15 source: probe begin { foo = 1 ; foo = "bar" ; noo = 4 } ^ semantic error: type mismatch (string): identifier 'noo' at :8:39 source: probe end { foo = "zoo" ; foo <<< 2 ; noo = "zoo" } ^ semantic error: type was first inferred here (long): identifier 'noo' at :6:39 source: probe begin { foo = 1 ; foo = "bar" ; noo = 4 } ^ Pass 2: analysis failed. [man error::pass2] Number of similar warning messages suppressed: 6. Rerun with -v to see them. [root@intel-wildcatpass-03 src]# echo $? 1 ==== Do you not get those 2 semantic errors? -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax)