From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7573 invoked by alias); 20 Feb 2017 18:41:59 -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 7490 invoked by uid 48); 20 Feb 2017 18:41:55 -0000 From: "dsmith at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/21173] odd translator behavior with overloaded functions Date: Mon, 20 Feb 2017 18:41:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dsmith at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2017-q1/txt/msg00108.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D21173 --- Comment #2 from David Smith --- If I comment out the call to __inode_vfsmount(), I get the expected error a= bout a type mismatch: =3D=3D=3D=3D # cat ../src/test.stp function foo:long(a:long, b:long) { return (a + b) } function foo:string(a:long, b:string, c:long) { return sprintf("%s %d", b, a + c) } probe begin { # println(__inode_vfsmount(1)) println(foo(1, 2, 3)) } # stap -p2 ../src/test.stp WARNING: Eliding unused function 'foo': identifier 'foo' at ../src/test.stp:1:10 source: function foo:long(a:long, b:long) ^ semantic error: type mismatch: expected long but found string: number '2' at :14:17 source: println(foo(1, 2, 3)) ^ Pass 2: analysis failed. [man error::pass2] =3D=3D=3D=3D If I comment out the call to foo(), the script gets passes the semantic pass with no problems (other than warning about unused function 'foo'). =3D=3D=3D=3D # cat ../src/test.stp function foo:long(a:long, b:long) { return (a + b) } function foo:string(a:long, b:string, c:long) { return sprintf("%s %d", b, a + c) } probe begin { println(__inode_vfsmount(1)) # println(foo(1, 2, 3)) } # stap -p2 ../src/test.stp > /dev/null WARNING: Eliding unused function 'foo': identifier 'foo' at ../src/test.stp:1:10 source: function foo:long(a:long, b:long) ^ Number of similar warning messages suppressed: 1. Rerun with -v to see them. =3D=3D=3D=3D Somehow it is the combination of the two that causes the odd behavior. --=20 You are receiving this mail because: You are the assignee for the bug.