From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 2924B3858D38 for ; Wed, 14 Jun 2023 09:25:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2924B3858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686734705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9nZyU5lzGR30soX6P8h5SC6Rn1IHlFM0QmXlk2CIaZA=; b=LTr3AEnbCUOPKiGdICqaXFn1h3Mf2P7e+leOx9dFUmXF+2TlK1kadgXCchEPHXMFmb/gMF 3kiFK4u065Xed3c+n9besGhbtWOcTAAhmeXX0Iat4G1UYaz69KZfBnaQS4O4egOR4yNQxM j2JjBGuZMLpIBFXP7L2to/AmB5pAkO4= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-314-GDo5CXfHNFin6b9E88_Mqw-1; Wed, 14 Jun 2023 05:25:02 -0400 X-MC-Unique: GDo5CXfHNFin6b9E88_Mqw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1247F2932487; Wed, 14 Jun 2023 09:25:02 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2A7752026D49; Wed, 14 Jun 2023 09:25:01 +0000 (UTC) From: Florian Weimer To: Roger Phillips via Libc-help Cc: Roger Phillips Subject: Re: Getting more info about a heap corruption References: Date: Wed, 14 Jun 2023 11:24:59 +0200 In-Reply-To: (Roger Phillips via Libc-help's message of "Wed, 14 Jun 2023 07:21:06 +0000") Message-ID: <87a5x2s8es.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Roger Phillips via Libc-help: > Problem is that variables needed for this check like victim, bck and > next are optimized out and thus not accessible in gdb. Only av and its > contents are accessible. I cannot use asan binaries as it is a > production test. Changing environment variables is possible though. You could use LD_PRELOAD to install debugging malloc (such as the ASAN allocator), or use LD_PRELOAD=libc.so.6 with a build of glibc (from the same sources as the system glibc version) with reduced optimization. I think there are also GDB scripts out there that traverse the various heap data structures and report inconsistencies. Thanks, Florian