Bug 402327 - Warning: DWARF2 CFI reader: unhandled DW_OP_ opcode 0x13 (DW_OP_drop)
Summary: Warning: DWARF2 CFI reader: unhandled DW_OP_ opcode 0x13 (DW_OP_drop)
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: 3.15 SVN
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-18 22:41 UTC by Nikos Chantziaras
Modified: 2018-12-19 19:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos Chantziaras 2018-12-18 22:41:36 UTC
SUMMARY
Running GTK or Qt in Valgrind prints the following warning:

--2646-- Warning: DWARF2 CFI reader: unhandled DW_OP_ opcode 0x13


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux AMD64
KDE Plasma Version: 5.14.4
KDE Frameworks Version: 5.53.0
Qt Version: 5.11.3
Comment 1 Mark Wielaard 2018-12-19 16:32:16 UTC
That is DW_OP_drop which indeed isn't implemented. But should be trivial to:

diff --git a/coregrind/m_debuginfo/readdwarf.c b/coregrind/m_debuginfo/readdwarf.c
index 70ab16d67..3b7449a5b 100644
--- a/coregrind/m_debuginfo/readdwarf.c
+++ b/coregrind/m_debuginfo/readdwarf.c
@@ -2853,6 +2853,12 @@ static Int dwarfexpr_to_dag ( const UnwindContext* ctx,
                VG_(printf)("DW_OP_deref");
             break;
 
+         case DW_OP_drop:
+            POP( ix );
+            if (ddump_frames)
+               VG_(printf)("DW_OP_drop");
+            break;
+
          default:
             if (!VG_(clo_xml))
                VG_(message)(Vg_DebugMsg, 

Does that help?
Comment 2 Nikos Chantziaras 2018-12-19 16:46:04 UTC
That does indeed help. Warning is gone.
Comment 3 Mark Wielaard 2018-12-19 19:18:50 UTC
Thanks for testing. Lets just push this:

commit e4dde1327e1ca1868aabf2b89bc818d37864e3cc
Author: Mark Wielaard <mark@klomp.org>
Date:   Wed Dec 19 20:14:03 2018 +0100

    PR402327 Warning: DWARF2 CFI reader: unhandled DW_OP_ opcode 0x13 DW_OP_drop
    
    readdwarf.c (dwarfexpr_to_dag) didn't handle DW_OP_drop.
    Implement it by simply popping the last element on the stack.