Skip to content

Commit e4f4705

Browse files
art049claude
andcommitted
fix(callgrind/tests): prevent printf inlining in inline tests
Add -D_FORTIFY_SOURCE=0 to inline test CFLAGS to prevent glibc from providing inline wrappers for printf via stdio2.h. This ensures the tests only capture the intended inline function calls. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d54bf14 commit e4f4705

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

callgrind/tests/Makefile.am

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ AM_CFLAGS += $(AM_FLAG_M3264_PRI)
3434
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
3535

3636
# Inline tests need -O2 to enable inlining and -g for debug info
37-
inline_samefile_CFLAGS = $(AM_CFLAGS) -O2 -g
38-
inline_crossfile_CFLAGS = $(AM_CFLAGS) -O2 -g
37+
# Use -D_FORTIFY_SOURCE=0 to prevent glibc from inlining printf and other stdio functions
38+
inline_samefile_CFLAGS = $(AM_CFLAGS) -O2 -g -D_FORTIFY_SOURCE=0
39+
inline_crossfile_CFLAGS = $(AM_CFLAGS) -O2 -g -D_FORTIFY_SOURCE=0
3940

4041
threads_LDADD = -lpthread

0 commit comments

Comments
 (0)