Re: ubsan - Mailing list pgsql-hackers

From David Steele
Subject Re: ubsan
Date
Msg-id 0befb6fb-d125-95f2-9815-7dbda8086f25@pgmasters.net
Whole thread Raw
In response to Re: ubsan  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 3/23/22 16:55, Andres Freund wrote:
> 
> It's particularly impressive that the cost of running with ASAN is *so* much
> lower than valgrind. On my workstation a check-world with
> -fsanitize=alignment,undefined,address takes 3min17s, vs 1min10s or so without
> -fsanitize.  Not something to always use, but certainly better than valgrind.

It also catches things that valgrind does not so that's a bonus.

One thing to note, though. I have noticed that when enabling 
-fsanitize=undefined and/or -fsanitize=address in combination with 
-fprofile-arcs -ftest-coverage there is a loss in reported coverage, at 
least on gcc 9.3. This may not be very obvious unless coverage is 
normally at 100%.

Regards,
-David



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Corruption during WAL replay
Next
From: Guillaume Lelarge
Date:
Subject: Re: Probable memory leak with ECPG and AIX