Re: ubsan

From: David Steele <david(at)pgmasters(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ubsan
Date: 2022-03-25 15:55:45
Message-ID: 0befb6fb-d125-95f2-9815-7dbda8086f25@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

  • Re: ubsan at 2022-03-23 22:55:28 from Andres Freund

Browse pgsql-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2022-03-25 15:59:00 Re: Probable memory leak with ECPG and AIX
Previous Message Tom Lane 2022-03-25 15:50:48 Re: Corruption during WAL replay