[PATCH RFC] __builtin_dynamic_object_size with -D_FORTIFY_SOURCE=3

Florian Weimer fweimer@redhat.com
Mon Nov 30 10:06:47 GMT 2020


* Siddhesh Poyarekar:

> Besides the bug, do you think a performance tradeoff should result in
> us having this 2 vs 3 differentiation?  I didn't make the 2 vs 3
> proposal specifically to work around this bug although though it does
> make it easier for us to add support into glibc without blocking on
> llvm fixing it.  In general, dynamic object size checks may end up
> having an additional performance tradeoff (even __bdos without this
> bug will have additional instructions emitted, perhaps even spills,
> making them a wee bit slower) and it may be desirable to have a
> separate fortification level to allow developers to choose.

I really dislike more developer choices.  I think we should experiment
with this with a fixed Clang, and see what the generated code looks like
in practice.

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill



More information about the Libc-alpha mailing list