From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B642238C23 for ; Tue, 25 Nov 2025 13:50:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764078614; cv=none; b=NrRcgFgrlu+GL5UYoTWF2PfEDyut9pHCnyPxpx+JNIQY1zh3fgfuGil+02x56HDytYzCV1o/vRpHnlIyh3ceveRCXfY17BTQGHB7E4S4/oSqVPA6XtS65gNVDeCdb/5zSBDDtXJPR4KOlG1WPJrlX9PSxzbGVvXzwkh6b6Bvq70= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764078614; c=relaxed/simple; bh=1o5oPMfIaZYioBRceBs3wkvIpCwBHBdCR9dWfV7wSAs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MZ+frPPSqePkkjzVasCn2DvH2BV5+bhgUgPkivU3637+KIdmNA9W3p+giR3gd9e1szbRlZTuFTytzUrNi45kt7EOepzCDStJlbxhogm7M2m990xAk47+X2fJSsTx4bSaCS9Ux36fuS3YZ+LLuXeAit3o0eg48VUpW9Vlouvmm4I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=YsjAK2PU; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="YsjAK2PU" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-477b5e0323bso34533475e9.0 for ; Tue, 25 Nov 2025 05:50:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764078611; x=1764683411; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LNRXP5HhE9ANQ+zmZ0y1eokqnn075Maj/yTjPuTPa6Y=; b=YsjAK2PU4iNmNMF33nbRria6E91SWSrDgY9sQbPAZIl/z9Sn6DEF28AI4EUrvdwgjo 8STCWj5WUjfr9Z7CrlE2TIJghuxCro0Q2VKVBSYFzQf5zVc4ahts0vUZe1m4z/hVxbrH A7Z+cD//OBvaxrbZFM9SMbIjGsXahBFxoSPOYmna+C5wjl8exNSRRDPFiJkhYrEqIVBm Nl7p8vhlyQrn4thWAPlkvmL+6e/ROdYkbC+a4XDjATIIet0LYvZ84+utBiybod2cysn5 lbWdrNPhJPBDY7UcklsohC3BvhozS0nH8wE0McEF9xJ7Xdujvv9qCVsGmCtXos4M5Aa1 2pmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764078611; x=1764683411; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LNRXP5HhE9ANQ+zmZ0y1eokqnn075Maj/yTjPuTPa6Y=; b=rVmYxzyFrUpovqkmzeCLL3aMt+OizC5f6qgMS6IiifE+VElXwisqukiDoL39Mp3b7/ 9XXOZPVWi0PzATZrbkvlRqaaXGCEp4n7ApepGNfYyeu6Fj31OhB/nmm/7+CIKWO7ZY7B ibi2AGJJFO37kO1Mr1HHqwQ00laJJBTl5Qd8iV18qH83itRmQQB9cSCh8j0O6FyG4NUh bSA+BtupmTHHo2yqMpQ1WuAAzrHQJVkI2z7ZXWp1d0LyspmbpfdtKBnAGd5611Bc+MBW 1zH85gQDmMDE0JMEy/FzBObIoIyrSKvwXpGeSeiwYoYjZOlgRvnN1ObS6ULrKDGtxqzi MrqA== X-Gm-Message-State: AOJu0Yykau72pv+wnQj8SBkqFTrRIUx3xxCw/6ma4N8d9PoOfa7hf34+ CFGlVUHkwlltWKojOqXmNOVcQDjK1Yq1jfDJv2m6G8aBzLp8DwrJVHJNfinI170aoEs= X-Gm-Gg: ASbGncubgnJFQlC0CsGOtivaUC9/+VsDLDIxJ9nZvkDP4+Y87RuPDk/AzgrfUJL5ic4 GCjeeslxYZDF7Uha4Mgv7aYtTfJXWLTWlTrpBOROy/8frMPTcGdKmz0EhPmjcQ8D6zWbX2kRVNj oJjZ8Ei7PbCQlnitJXfOT+yHVJE/r9ysL3ddX/Mc7yhXHu+NARMz776GsOY4SnoZtoFLjec4pBZ eDK9ReWOJ0/oDgI8uiuN33OamjApxgW82Lp8QXtqrGFtdbBLwuditRYjIY80qdBSwlwix+DJaxx iNs22H4NOuBcNzCoYR7Wz4z9O8MUSsXsp5RqejNAPy+io0IRP86Yoc2p+4VPVdkdP3AnkLaUasx oPBmK3C34iZYkKVR2nCozenPCq5HYrUhDItb/DNWzpSLxts08BFIsFHThlQBLDcLRppCbffeDMR EVWONYKULfzY3v7p9L X-Google-Smtp-Source: AGHT+IEfjBIX49njca4U5CsRKuYqyqa1Ksuoz+xRNLj8d/+fMjJiGW61m4cNFnvoC/D5S4JVl9scag== X-Received: by 2002:a05:6000:2911:b0:429:cfa3:5fde with SMTP id ffacd0b85a97d-42cba652baamr22842048f8f.11.1764078610508; Tue, 25 Nov 2025 05:50:10 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-42cb7f34fd1sm35234776f8f.11.2025.11.25.05.50.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Nov 2025 05:50:10 -0800 (PST) Date: Tue, 25 Nov 2025 16:50:06 +0300 From: Dan Carpenter To: Toomas Soome Cc: smatch@vger.kernel.org Subject: Re: apparent bug about check_free_strict Message-ID: References: <719690CC-A1F0-47B7-AD43-0A1EBD632081@me.com> <13919A78-B19A-4A44-95F1-A729562C50BF@me.com> <7F97D3F0-18D3-4025-A6D2-74773061A56F@me.com> <45D1224C-6C4C-4745-9FA6-F07BB1792831@me.com> Precedence: bulk X-Mailing-List: smatch@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45D1224C-6C4C-4745-9FA6-F07BB1792831@me.com> On Tue, Nov 25, 2025 at 03:37:08PM +0200, Toomas Soome wrote: > > Ok, i did pull your latest update, and the problem is still there. I actually got very graphical example: > > /code/illumos-gate/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386/smatch: ../smb_share_doorclnt.c:274 smb_share_count() warn: passing freed memory 'dec_ctx' (line 272) > /code/illumos-gate/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386/smatch: ../smb_share_doorclnt.c:279 smb_share_count() warn: passing freed memory 'dec_ctx' (line 272) > These warnings are almost certainly caused because Smatch thinks smb_share_dchk() is freeing the pointer. It generates two warnings because the if and else paths are handled separately. It's possible this is a Makefile bug... Could you do a make clean and rebuild Smatch? regards, dan carpenter