https://bugs.kde.org/show_bug.cgi?id=445235

            Bug ID: 445235
           Summary: Java/Ada/D demangling is probably broken
           Product: valgrind
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: jsew...@acm.org
          Reporter: n.netherc...@gmail.com
                CC: jsew...@acm.org, m...@klomp.org,
                    philippe.waroqui...@skynet.be
        Depends on: 445184
  Target Milestone: ---

+++ This bug was initially created as a clone of Bug #445184 +++

Valgrind has code to demangle symbols for: C++, Rust, Java, Ada, and D. But the
Java/Ada/D demangling is probably broken because the code is unreachable.

`VG_(demangle)` has an initial test that requires that the first two chars be
"_Z" or "_R", which excludes a bunch of cases. Also, the code in
`ML_(cplus_demangle)` that calls the demanglers for Java/Ada/D is a bit
different to that for C++ and Rust (in the way the `*_DEMANGLING` constants are
used), which may also be a problem.

>From a quick look at the code, I think the following is true.
- C++ symbols usually start with "_Z", but "_GLOBAL_" is also possible, which
won't work.
- Rust symbols start with "_Z" or "_R".
- Java symbols are a subset of C++ symbols, so should be ok, modulo possible
"_GLOBAL_" cases, and possible AUTO_DEMANGLING problems.
- D symbols start with "_D", and so will be broken.
- Ada symbols can start with "_ada_", or with a lower-case letter, and so will
be broken.


Referenced Bugs:

https://bugs.kde.org/show_bug.cgi?id=445184
[Bug 445184] Rust v0 symbol demangling is broken
-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to