From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aOT7JfXUc2H+AAAAgWs5BA (envelope-from ) for ; Sat, 23 Oct 2021 11:25:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id UIimIfXUc2HZfgAA1q6Kng (envelope-from ) for ; Sat, 23 Oct 2021 09:25:09 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E0C4C5080 for ; Sat, 23 Oct 2021 11:25:08 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id B573C29073; Sat, 23 Oct 2021 05:25:00 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 6EF712906D for ; Sat, 23 Oct 2021 05:24:56 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id C8D405FC42; Sat, 23 Oct 2021 05:24:55 -0400 (EDT) Received: (nullmailer pid 1403457 invoked by uid 1000); Sat, 23 Oct 2021 09:24:54 -0000 From: David Bremner To: Austin Ray , notmuch@notmuchmail.org Subject: WIP fixes for nulling of database argument on error Date: Sat, 23 Oct 2021 06:24:46 -0300 Message-Id: <20211023092451.1403141-1-david@tethera.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211023042225.xt36nzpsukqs6kid@athena> References: <20211023042225.xt36nzpsukqs6kid@athena> MIME-Version: 1.0 Message-ID-Hash: 7IMPBPBNSB4PRQ7DPODZYETKHINHRST6 X-Message-ID-Hash: 7IMPBPBNSB4PRQ7DPODZYETKHINHRST6 X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634981109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=DuAsjwX+8vTKdJ1GYdQDQDeXtjPDb18O7yieygl5qr4=; b=KNH0HIcfBKW3GTcFLgm4mC/4OB3iRfrWM2+VVQO1e0iQ76DvNVv38ohqkET1QKvRYw/yEv l6tEumbUatcXIc97+YMlCDmBw92uiO6MVV8B0vlLh6GI/0Ks4wdmqv4c+Scbw/KJrsfBUM zYuGon07NtIXkamrGe/bNyOExzUHNMM60yEork+LPhZ8bOv4LgldlOt7OKiBlGZ3y6eoYM P8JjrvcGKkwOS/CQujqKBb7XGnNCYFkN6PbOiSv13iUisM7HmCo5sDXKGIHI0dJnzO0OU5 zM2krf3AZtLGm3mebJzXpdNRJkRDYF8ogMJlXj3E1z/HfoYe/UMOg/SkZzR6Wg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634981109; a=rsa-sha256; cv=none; b=rkXMTdbezc188Vgnd8MrqavCMIzrHEz3Rh2xwdaKQmIDrlY+jllPMZlVA8U4fK0sU6CzVX BgxNOKz6t7uJ2mRTKP7yBzBYobQDB7IaD0VBjgmHXFjlUYVdeRpgpsGlkFUUjAYIlPjVd1 G9VqlvbBJR5RaaHj0atCaT4AQIxiZ27JtKiW4YWCAyvimVlL3O1jKA1WmObAPZVDlPz85q S6LoAxUChQ/Pk87ZEMb2kf+Wb1Hn61TUSfGBft9iOcuRGKPeupuONRGhtiZ0OnzAVZUai/ QF1xKJQ+fSX4t9FSQSMjUdGcux2J2exqNS0KYdB4i69aNsqQJBjkVktVNiWe8g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.15 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: E0C4C5080 X-Spam-Score: -1.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: QwC8cFXaHP84 I'm not quite happy with the tests for notmuch_database_load_config (it's not completely trivial to trigger the specific kind of error behaviour that should result in a NULL database parameter), but here is what I have so far. In particular it fixes a bug in deallocation on the error path. I didn't run it under ASAN yet.