From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 675AE3951896; Tue, 4 May 2021 08:26:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 675AE3951896 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug guile/27806] free(): invalid pointer during gdb.ada/fixed_cmp.exp Date: Tue, 04 May 2021 08:26:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: guile X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned 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-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2021 08:26:20 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27806 --- Comment #15 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D225bda24db96= 71e2087fda892f94141625836a40 commit 225bda24db9671e2087fda892f94141625836a40 Author: Tom de Vries Date: Tue May 4 10:26:16 2021 +0200 [gdb/guile] Don't allow libguile to change libgmp mem fns Since gdb commit 880ae75a2b7 "gdb delay guile initialization until gdbscm_finish_initialization" I'm running into: ... (gdb) print My_Var > 10.0^M free(): invalid pointer^M ERROR: GDB process no longer exists GDB process exited with wait status 5995 exp9 0 0 CHILDKILLED SIGABRT SIGABRT UNRESOLVED: gdb.ada/fixed_cmp.exp: gnat_encodings=3Dall: print My_Var >= 10.0 ... The problem is that both gdb and libguile try to set the libgmp memory functions, and since the gdb commit the ones from libguile are effective, which results in gdb freeing some memory in a way that is not compatible with the way that memory was actually allocated. The fact that libguile tries to set the libgmp memory functions is a bug which should be fixed starting version v3.0.6. Meanwhile, work around this in gdb by not allowing libguile to set the libgomp memory functions. Tested on x86_64-linux. gdb/ChangeLog: 2021-05-04 Tom de Vries PR guile/27806 * guile/guile.c (gdbscm_initialize): Don't let guile change lib= gmp memory functions. --=20 You are receiving this mail because: You are on the CC list for the bug.=