This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/9] Add UBSan to the build
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> I think this is a good idea. On enabling this by default on devel
Pedro> builds, do you have a sense of CPU/memory overhead this introduces?
I have no idea about the CPU. It doesn't seem notably slower to me but
I am not sure I would really notice.
I don't think -fsanitize=undefined has notable memory overhead. I
believe it just introduces checks at spots where undefined behavior
might be possible.
It does increase the size of gdb:
size before:
text data bss dec hex filename
23070184 2372034 323664 25765882 18927fa gdb
size after:
text data bss dec hex filename
26879230 9135154 324688 36339072 22a7d80 gdb
I think this isn't so important because it's only for development mode
and because it can be turned off if need be.
Though, let's not oversell it -- UB sanitization didn't catch anything
very important. Address sanitizer, on the other hand, did; and if I can
fix that last bug I would like to give -fsanitize=address the same
treatment as was done here.
Tom