From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.lisp.guile.bugs Subject: bug#19883: Correction for backtrace Date: Thu, 26 Feb 2015 00:17:27 +0100 Message-ID: <878ufld1iw.fsf@fencepost.gnu.org> References: <87twyln70f.fsf@fencepost.gnu.org> <873865n2rr.fsf@fencepost.gnu.org> <87twy91vtc.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1424906304 700 80.91.229.3 (25 Feb 2015 23:18:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Feb 2015 23:18:24 +0000 (UTC) Cc: 19883@debbugs.gnu.org To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Feb 26 00:18:13 2015 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 1YQlDW-0007nK-QH for guile-bugs@m.gmane.org; Thu, 26 Feb 2015 00:18:11 +0100 Original-Received: from localhost ([::1]:56710 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQlDW-0002Qz-7H for guile-bugs@m.gmane.org; Wed, 25 Feb 2015 18:18:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQlDT-0002ON-3u for bug-guile@gnu.org; Wed, 25 Feb 2015 18:18:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQlDO-0005cW-VU for bug-guile@gnu.org; Wed, 25 Feb 2015 18:18:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQlDO-0005cS-T6 for bug-guile@gnu.org; Wed, 25 Feb 2015 18:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YQlDO-0007Hr-Ei for bug-guile@gnu.org; Wed, 25 Feb 2015 18:18:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: David Kastrup Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 25 Feb 2015 23:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19883 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 19883-submit@debbugs.gnu.org id=B19883.142490625027975 (code B ref 19883); Wed, 25 Feb 2015 23:18:02 +0000 Original-Received: (at 19883) by debbugs.gnu.org; 25 Feb 2015 23:17:30 +0000 Original-Received: from localhost ([127.0.0.1]:58109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQlCs-0007H8-6C for submit@debbugs.gnu.org; Wed, 25 Feb 2015 18:17:30 -0500 Original-Received: from fencepost.gnu.org ([208.118.235.10]:54141 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQlCq-0007H1-MU for 19883@debbugs.gnu.org; Wed, 25 Feb 2015 18:17:29 -0500 Original-Received: from localhost ([127.0.0.1]:33214 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQlCp-00017g-Pv; Wed, 25 Feb 2015 18:17:28 -0500 Original-Received: by lola (Postfix, from userid 1000) id 62F6DE09A7; Thu, 26 Feb 2015 00:17:27 +0100 (CET) In-Reply-To: <87twy91vtc.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Wed, 25 Feb 2015 23:16:15 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7726 Archived-At: ludo@gnu.org (Ludovic Court=C3=A8s) writes: > David Kastrup skribis: > >> This is embarrassing: I used the wrong executable in connection with the >> core dump. With the matching executable, the coredump makes a lot more >> sense: >> >> #0 0x00000000 in ?? () >> #1 0x0804aee0 in Smob_base::mark_trampoline (arg=3D0x9fbb000) >> at smobs.tcc:34 >> #2 0xb761b2da in ?? () from /usr/lib/libguile-2.0.so.22 >> #3 0xb72751f8 in GC_mark_from () from /usr/lib/i386-linux-gnu/libgc.so.1 > > Could you try commenting out all the SMOB mark functions in LilyPond? > > This doesn=E2=80=99t fix the bug, of course, but it=E2=80=99s probably a = good > workaround: user-provided mark functions are not needed in Guile 2.0 > since libgc scans the whole heap for live pointers. Even the test program crashes at the end (when `count' is called in order to traverse the created hierarchy) when you disable the setting of the mark function in the init method in smobs.tcc. A pointer to a C++ structure does not appear to protect the corresponding SMOB data and free_smob calls the delete operator which calls destructors and clobbers the memory area. Program received signal SIGSEGV, Segmentation fault. 0x08049b0a in std::vector >::size ( this=3D0x1b8b) at /usr/include/c++/4.9/bits/stl_vector.h:655 655 { return size_type(this->_M_impl._M_finish - this->_M_impl._M_sta= rt); } (gdb) bt #0 0x08049b0a in std::vector >::size ( this=3D0x1b8b) at /usr/include/c++/4.9/bits/stl_vector.h:655 #1 0x08049498 in Family::count (this=3D0x1b7f) at test.cc:53 #2 0x0804947c in Family::count (this=3D0x834f350) at test.cc:54 #3 0x0804947c in Family::count (this=3D0x8297d40) at test.cc:54 #4 0x0804947c in Family::count (this=3D0x828a9f8) at test.cc:54 #5 0x0804947c in Family::count (this=3D0x817d768) at test.cc:54 #6 0x0804947c in Family::count (this=3D0x828d588) at test.cc:54 #7 0x0804947c in Family::count (this=3D0x83298b8) at test.cc:54 #8 0x0804947c in Family::count (this=3D0x817fe58) at test.cc:54 #9 0x080495df in workload (avv=3D0xbffff074) at test.cc:73 #10 0xb7e66dfd in ?? () from /usr/lib/libguile-2.0.so.22 #11 0xb7ef08e7 in ?? () from /usr/lib/libguile-2.0.so.22 #12 0xb7ec9fb9 in ?? () from /usr/lib/libguile-2.0.so.22 #13 0xb7f08f20 in ?? () from /usr/lib/libguile-2.0.so.22 #14 0xb7f09539 in ?? () from /usr/lib/libguile-2.0.so.22 #15 0xb7e714f3 in scm_call_4 () from /usr/lib/libguile-2.0.so.22 #16 0xb7ef0acf in scm_catch_with_pre_unwind_handler () from /usr/lib/libguile-2.0.so.22 #17 0xb7ef0bd4 in scm_c_catch () from /usr/lib/libguile-2.0.so.22 #18 0xb7e675d1 in ?? () from /usr/lib/libguile-2.0.so.22 #19 0xb7e676d3 in scm_c_with_continuation_barrier () from /usr/lib/libguile-2.0.so.22 #20 0xb7eedf7e in ?? () from /usr/lib/libguile-2.0.so.22 #21 0xb7b272c1 in GC_call_with_stack_base () from /usr/lib/i386-linux-gnu/libgc.so.1 #22 0xb7eee3e6 in scm_with_guile () from /usr/lib/libguile-2.0.so.22 #23 0x08049685 in main (ac=3D4, av=3D0xbffff074) at test.cc:85 --=20 David Kastrup