Re: [hatari-devel] fixing errors reported by GCC 10 -fanalyzer |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] fixing errors reported by GCC 10 -fanalyzer
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Tue, 12 May 2020 21:28:57 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1589311740; bh=lA9W4E7r2AGzZRn4htn63KuBP4w2/C3b0svJpvF8t80=; h=Date:From:To:Subject:From; b=Ha1WS9vlw3c0WEewRpY/b8JGdrQjDmROPe7hXL4c6SADJVlH0CnadKMRa26zX76G7 JR7Bb7Cz6pG5MH1hfqdJxN8ii6YDK8CCHOKifJLRPDpj4Toqu890HZoHv91k2WiK85 hMRVP2EK308NJk0ltIl43tvgIE18tJPrUdUaX8wyR5eH768G88CPhvYQQPi8Pzj0Z9 AIjortCujH7ibRRJuLbNrVXu3sVWgVpnaFSD80oYbXsJFU9cMcfXI/w2TSquOtKh/3 pxz3lwDgAzWJ7d3P1Un1HlO75Pr7KxXTlxEkJSCY2aqLiOjv5iX3brFnl16oVbqJCr PPQK50I5IpuTA==
Am Mon, 11 May 2020 18:05:17 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> Hi,
>
> On 5/11/20 4:13 PM, Nicolas Pomarède wrote:
> > Le 11/05/2020 à 14:56, Thomas Huth a écrit :
> >
> >> I think I'm with Eero here and rather would prefer to keep such
> >> assert()s that check for logical errors (i.e. things that "should
> >> never happen"). But we should really check for asserts that are
> >> used for "normal" error handling, i.e. the where we use it for
> >> checking the return value of malloc() and friends.
> >
> > Ok ; but how to we handle the fact that assert are disabled at
> > compile time in release mode (or with whatever flags a linux distro
> > might supersedes the flags from hatari) ?
> >
> > This means assert() will only be visible for developers or those
> > building in debug mode, but when Hatari is compiled for
> > mac/windows/linux distro the assert are no more there and we know
> > that many errors are reported by users, not by people doing the
> > dev. These people will mostly get a crash sooner or later due to
> > memory corruption and there will be no message to tell us what
> > happened.
>
> "Impossible things" shouldn't happen in Hatari's final releases if
> they've been properly tested,
> so I think it's OK to disable asserts for them
I agree, for the release tarballs, I think it's ok if the asserts are
disabled there. For the Linux distros, I think we should simply leave
the decision to the package maintainer - they should configure the
build in their spec file as desired.
> But I strongly think that daily snapshot builds
> and Hatari development versions should default to
> building with asserts.
Right. I've enabled the Debug build type now for most of the CI
pipelines.
> Thomas is defaulting to debugrelease target
> instead of release target enough?
What's the debugrelease target? I can't find any cmake documentation
about that...? Running "cmake -DCMAKE_BUILD_TYPE:STRING=debugrelease ."
simply seems to compile without any CFLAGS at all, so this build type
does not seem to exist?
Thomas