Skip to content

Conversation

theuni
Copy link
Contributor

@theuni theuni commented Feb 3, 2023

Only bail out early if the call is NEITHER type of builtin.

Without this change, for me no fortification is ever detected.

gcc -fplugin=fmetrics.so -fplugin-arg-fmetrics-project=TEST tests/builtin-dynamic-object-size-0.c -c -o tests/builtin-dynamic-object-size-0.o -D_FORTIFY_SOURCE=3 -O2

Without the change:
TEST:: 0:0:0

With the change:
TEST:: 43:2:31

Only bail out early if it's NEITHER type of builtin.
@siddhesh
Copy link
Owner

siddhesh commented Feb 6, 2023

Oops, thanks for catching and fixing this!

@siddhesh siddhesh merged commit 5c2b544 into siddhesh:main Feb 6, 2023
@theuni theuni deleted the fix-builtin-detection branch February 6, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants