From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp2120.oracle.com ([141.146.126.78]:57144 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729546AbfLLQzl (ORCPT ); Thu, 12 Dec 2019 11:55:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2019-08-05; bh=PuqPWPJ6EEbXUfz7lfbDydvhsliW4QzhhqxGFlIDbUM=; b=alsPSmDdRVUx9VsboQ+HIQcfC8UYRpKMYQCr4OvXoHYhjdG+r4YXFl6xxlNEUHyaXD5T UwkVo4uets72ZX03vrc2r6TGXCksiTNquGGtTQe94GOZCEGgxVF2z3G0Dichznp7cFdy rRXpoDQtAg/oZVMxzcd6VJq6a+yLEmHXjOBNVBm1yeQKOvyQc23vKT/8vxw/30RvCcTQ irJsjYySkDKofnch4MkdXIB+91hwVyJZ+RkYZvV8MjL1aL9os8PNnR7iLkr2RrStLqQb SlOTu41WN51gNfKnjrWud5Ayvhut3kF4eqyg13oZRa0L4LDMktSfbsbmpefKU3scUS60 AQ== Date: Thu, 12 Dec 2019 19:55:20 +0300 From: Dan Carpenter Subject: Re: sval_type_max() sadness Message-ID: <20191212165520.GC1895@kadam> References: <20191211142430.GA17277@movementarian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191211142430.GA17277@movementarian.org> Sender: smatch-owner@vger.kernel.org List-ID: To: John Levon Cc: smatch@vger.kernel.org, rm@fingolfin.org Thanks for the test case! Of course, the history here is that the Linux kernel doesn't have floats so I never added support for it. I have this friend who is an expert on floats and people consult him when they are designing chips. He was explaining his work to me and I realized that I don't have the foggiest clue how floats work at all... Anyway, I've tried to add floats to Smatch. It turned out not so hard as I imagined, but I know there are places that I missed. Probably it changes from a false positive into a crashing bug now. :/ The fix is almost always going to be to run valgrind to see which function crashes and then add a check: if (type_is_fp(estate_type(state))) return false; Do a pull and take a look. Tell me what you think. I will hack on this tomorrow as well. regards, can carpenter