From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#14849: (system vm coverage) `line-execution-counts' misleading output Date: Tue, 21 Jun 2016 09:09:02 +0200 Message-ID: <877fdj588h.fsf@pobox.com> References: <8761wfal97.fsf@taylan.uni.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466493075 24643 80.91.229.3 (21 Jun 2016 07:11:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Jun 2016 07:11:15 +0000 (UTC) Cc: 14849-done@debbugs.gnu.org To: taylanbayirli@gmail.com (Taylan Ulrich B.) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Jun 21 09:11:04 2016 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bFFps-0000Ht-KB for guile-bugs@m.gmane.org; Tue, 21 Jun 2016 09:11:00 +0200 Original-Received: from localhost ([::1]:49293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFFpm-0001NG-TF for guile-bugs@m.gmane.org; Tue, 21 Jun 2016 03:10:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFFp2-0000ng-SN for bug-guile@gnu.org; Tue, 21 Jun 2016 03:10:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFFow-0003Qn-Rb for bug-guile@gnu.org; Tue, 21 Jun 2016 03:10:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFFow-0003Qi-OB for bug-guile@gnu.org; Tue, 21 Jun 2016 03:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bFFow-0000eM-JI for bug-guile@gnu.org; Tue, 21 Jun 2016 03:10:02 -0400 Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-To: bug-guile@gnu.org Resent-Date: Tue, 21 Jun 2016 07:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 14849 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Mail-Followup-To: 14849@debbugs.gnu.org, wingo@pobox.com, taylanbayirli@gmail.com Original-Received: via spool by 14849-done@debbugs.gnu.org id=D14849.14664929542434 (code D ref 14849); Tue, 21 Jun 2016 07:10:02 +0000 Original-Received: (at 14849-done) by debbugs.gnu.org; 21 Jun 2016 07:09:14 +0000 Original-Received: from localhost ([127.0.0.1]:48447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFFo9-0000dA-VH for submit@debbugs.gnu.org; Tue, 21 Jun 2016 03:09:14 -0400 Original-Received: from pb-sasl2.pobox.com ([64.147.108.67]:53176 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFFo8-0000d3-U2 for 14849-done@debbugs.gnu.org; Tue, 21 Jun 2016 03:09:13 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 7515E2088D; Tue, 21 Jun 2016 03:09:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=Wh9Z27u/X9BjLj6RmTyLrklrHS8=; b=P5bsKx 4wQgJFKoxFboOgJ9kygW7zIk2khPZtBKhSqbnXMfl94VBi1GsLNUUltiNLnk9cre hri0aiASaYCnEhTJ5/t7jxv8dpyO1D2OkwYL3gKv1lTXbO4uUWHhPV+JcqHn3o1K wPPruA73Bqf3oVyx4JxKpzIzOgfjDZFVPy2NU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=HIVpfu+N7oj7RuTAhkBq/8C2P0eSTfCi S6SZ2CQoPvEAiXrToP3g2A9vNY6fGXqcZxWibAfEE+B07YzhFGgygMLhrx5/ZuGp rbXOMXLy6f10/lf8SUJS32seCTI+UCIak+ExRPjAcECHVPRc6mXTr9KiAaVD5wcu bngsjJi3Rwg= Original-Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id 6DA782088C; Tue, 21 Jun 2016 03:09:10 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl2.pobox.com (Postfix) with ESMTPSA id 858092088B; Tue, 21 Jun 2016 03:09:09 -0400 (EDT) In-Reply-To: <8761wfal97.fsf@taylan.uni.cx> (Taylan Ulrich B.'s message of "Fri, 12 Jul 2013 16:47:00 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-Pobox-Relay-ID: 0CE89A5E-377F-11E6-8604-28A6F1301B6D-02397024!pb-sasl2.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8056 Archived-At: I have tried this one on master and it exhibits the results you expect, not the buggy results. I added the test to the test suite. I don't plan on devoting resource to fixing this bug in 2.0 though, so I'm closing it for now. Feel free to reopen if you hvae a patch to fix :) Andy On Fri 12 Jul 2013 16:47, taylanbayirli@gmail.com (Taylan Ulrich B.) writes: > The following shell/guile transcript showcases a minimal test-case for > when a tail-call fools the code-coverage module into thinking that the > line with the tail-call was not executed. > > The result in the Guile transcript, $1, is an alist from line numbers > (starting from zero) to execution counts. > > Converting the relevant coverage-data object into LCOV data via > `coverage-data->lcov', as advertised in (info "(guile) Code > Coverage"), then to HTML via LCOV's genhtml(1), will result in the > relevant line being colored red and contribute negatively to the total > line-coverage percentage. > > === BEGIN TRANSCRIPT === > $ cat /tmp/test.scm > (define (tail-call-test) > (display "foo\n") > (tail-call-target)) > > (define (tail-call-target) > (display "bar\n")) > $ guile > GNU Guile 2.0.9.20-10454 > Copyright (C) 1995-2013 Free Software Foundation, Inc. > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. > This program is free software, and you are welcome to redistribute it > under certain conditions; type `,show c' for details. > > Enter `,help' for help. > scheme@(guile-user)> (begin > ... (load "/tmp/test.scm") > ... (call-with-values > ... (lambda () > ... ((@ (system vm coverage) with-code-coverage) > ... ((@ (system vm vm) the-vm)) > ... tail-call-test)) > ... (lambda (data . values) > ... ((@ (system vm coverage) line-execution-counts) data "/tmp/test.scm")))) > ;;; :0:4095: warning: possibly unbound variable `tail-call-test' > foo > bar > $1 = ((5 . 1) (4 . 1) (2 . 0) (1 . 1) (0 . 1)) > scheme@(guile-user)> > === END TRANSCRIPT ===