Bug 373176 - Invalid stack trace
Summary: Invalid stack trace
Status: CLOSED NOT A BUG
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.12.0
Platform: openSUSE Linux
: NOR major
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-02 08:09 UTC by Sujith Gunawardhane
Modified: 2016-12-02 09:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sujith Gunawardhane 2016-12-02 08:09:31 UTC
My Application calls __strcmp_sse42 function but Valgrind shows invalid stack trace.

It seems Valgrind takes the libclntsh.so.12.1 instead of libc-2.11.3.so.


==23093== Invalid read of size 1
==23093==    at 0x8638605: slaac_int (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x863850E: slrac (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x6DACA17: unw_is_signal_frame (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x6D98225: skgdsgframe (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x6C6AF00: kgdsdsts_extra (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x6C6AD35: kgdsdsts (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x81DCE5D: dbgemdGetCallStackWFlag (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x81DCD33: dbgemdGetCallStack (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x81DCED6: dbgemdFillCompFunNames (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x81DD5C2: dbgemdFillIncCtx (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x81E5D3A: dbgexPopulateIncCtx (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x81E3C32: dbgexProcessError (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x81AF4A9: dbgeExecuteForError (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x81AEF7E: dbgePostErrorDirect (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x83038A5: kpeDbgSignalHandler (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0x803A49F: skgesig_sigactionHandler (in /x01/app/oracle/product/12.1.0.1/client_1/lib/libclntsh.so.12.1)
==23093==    by 0xB31CBEF: ??? (in /lib64/libc-2.11.3.so)
==23093==    by 0x4C2A75F: __strcmp_sse42 (vg_replace_strmem.c:845)
==23093==    by 0x90E4DB: operator() (MMap.h:46)
==23093==    by 0x90E4DB: find (stl_tree.h:1915)
==23093==    by 0x90E4DB: find (stl_map.h:860)
==23093==    by 0x90E4DB: Get (MMap.h:214)
==23093==    by 0x90E4DB: operator[] (MTable.cpp:1200)
==23093==    by 0xA6331F: MThread_ThreadCallback (MThread.cpp:53)
==23093==    by 0xB6687B5: start_thread (in /lib64/libpthread-2.11.3.so)
==23093==    by 0xB3C3D6C: clone (in /lib64/libc-2.11.3.so)
==23093==  Address 0x70e3e is not stack'd, malloc'd or (recently) free'd
Comment 1 Tom Hughes 2016-12-02 08:55:38 UTC
Not at all - if you look at the top of the Oracle part of the trace you will see it is a signal handler.

So a signal has fired while your program was in strcmp and the signal handler Orcacle has installed has started executing and has accessed memory that it shouldn't, triggering a warning from valgrind.
Comment 2 Sujith Gunawardhane 2016-12-02 09:19:16 UTC
Thanks for the clarification