Bug 357034

Summary: Inlined functions are not reported for intel-compiled applications.
Product: [Developer tools] valgrind Reporter: Tanya <tatyana.a.volnina>
Component: memcheckAssignee: Julian Seward <jseward>
Status: RESOLVED NOT A BUG    
Severity: normal CC: philippe.waroquiers
Priority: NOR    
Version First Reported In: 3.10 SVN   
Target Milestone: ---   
Platform: RedHat Enterprise Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: a reproducer application

Description Tanya 2015-12-22 11:31:30 UTC
If an application is built with Intel compiler, memcheck report does not contain inlined functions.
A reproducer (inline_info.c) is attached.

Steps to build and run the test:
    icc -O0 inline_info.c -g -o inline_info_icc
    valgrind -q --read-inline-info=yes ./inline_info_icc

Expected result (reported for gcc-compiled application):	
==xxxx== Conditional jump or move depends on uninitialised value(s)
==xxxx==    at 0xxxxxxx: inlined (inline_info.c:5)
==xxxx==    by 0xxxxxxx: main (inline_info.c:13)
==xxxx== 

Actual result:
==xxxx== Conditional jump or move depends on uninitialised value(s)
==xxxx==    at 0xxxxxxx: main (inline_info.c:5)
==xxxx==
Comment 1 Tanya 2015-12-22 11:41:53 UTC
Created attachment 96256 [details]
a reproducer application
Comment 2 Philippe Waroquiers 2015-12-28 17:01:12 UTC
(In reply to Tatyana from comment #1)
> Created attachment 96256 [details]
> a reproducer application

Can you use
    objdump --dwarf inline_info_icc
and
    valgrind --trace-symtab=yes --trace-symtab-patt=*inline_info_icc*
to double check that effectively icc has inlined calls ?
It would be good to compare the dwarf inline information with the one generated
by gcc.
Comment 3 Tanya 2015-12-28 18:37:20 UTC
Hello Philippe,
Thank you for the clarification.
Apparently, Intel compiler does not generate full inline information by default (full inline info can be generated using "-debug inline_debug_info" compilation flag).