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

            Bug ID: 372120
           Summary: c++ demangler demangles symbols which are not c++
           Product: valgrind
           Version: 3.12 SVN
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: jsew...@acm.org
          Reporter: philippe.waroqui...@skynet.be
  Target Milestone: ---

For the below code, the demanglers demangle a non c++ symbol as if it
would be a mangled c++ name.
This was detected on an Ada program (as gnat mangles Ada names by
replacing . by __) but that equally happens on c symbols having 2 underscores.
To reproduce:
gcc -g -o demang demang.c
./vg-in-place --leak-check=full ./demang
==30660== 90 bytes in 9 blocks are definitely lost in loss record 2 of 2
==30660==    at 0x4C27BB5: malloc (vg_replace_malloc.c:299)
==30660==    by 0x400515: main__calling__some(...)(long long,...)(char)
(demang.c:7)
==30660==    by 0x40052C: main (demang.c:12)


#include <stdlib.h>
char *v;
void main__calling__some__exec(void)
{  
   int i;
   for (i = 0; i < 10; i++)
      v = malloc(10);
}

main ()
{
   main__calling__some__exec();
}

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to