[LLVMbugs] [Bug 17595] New: Issue found by valgrind

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 16 01:07:21 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17595

            Bug ID: 17595
           Summary: Issue found by valgrind
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: gold-plugin
          Assignee: unassignedbugs at nondot.org
          Reporter: octoploid at yandex.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

~ % valgrind --track-origins=yes --trace-children=yes clang++ -flto -O2
bench.cpp
...
==23495== 
==23495== Invalid read of size 1
==23495==    at 0x402B120: strlen (mc_replace_strmem.c:399)
==23495==    by 0x674F64: std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)
(in /usr/x86_64-pc-linux-gnu/binutils-bin/git/ld)
==23495==    by 0x5B8617: gold::Plugin_manager::add_input_file(char const*,
bool) (options.h:1717)
==23495==    by 0x41EE5EA: all_symbols_read_hook() (gold-plugin.cpp:444)
==23495==    by 0x5B7946:
gold::Plugin_manager::all_symbols_read(gold::Workqueue*, gold::Task*,
gold::Input_objects*, gold::Symbol_table*, gold::Dirsearch*, gold::Mapfile*, g
old::Task_token**) (plugin.cc:359)
==23495==    by 0x5B7A73: gold::Plugin_hook::run(gold::Workqueue*)
(plugin.cc:1420)
==23495==    by 0x609C3C: gold::Workqueue::find_and_run_task(int)
(workqueue.cc:319)
==23495==    by 0x609FC9: gold::Workqueue::process(int) (workqueue.cc:495)
==23495==    by 0x4069EF: main (main.cc:252)
==23495==  Address 0x544f1e8 is 24 bytes inside a block of size 47 free'd
==23495==    at 0x4028FF8: operator delete(void*) (vg_replace_malloc.c:480)
==23495==    by 0x5D3C92C: LTOCodeGenerator::~LTOCodeGenerator()
(basic_string.h:249)
==23495==    by 0x5C6121D: lto_codegen_dispose (lto.cpp:213)
==23495==    by 0x41EE56B: all_symbols_read_hook() (gold-plugin.cpp:435)
==23495==    by 0x5B7946:
gold::Plugin_manager::all_symbols_read(gold::Workqueue*, gold::Task*,
gold::Input_objects*, gold::Symbol_table*, gold::Dirsearch*, gold::Mapfile*, g
old::Task_token**) (plugin.cc:359)
==23495==    by 0x5B7A73: gold::Plugin_hook::run(gold::Workqueue*)
(plugin.cc:1420)
==23495==    by 0x609C3C: gold::Workqueue::find_and_run_task(int)
(workqueue.cc:319)
==23495==    by 0x609FC9: gold::Workqueue::process(int) (workqueue.cc:495)
==23495==    by 0x4069EF: main (main.cc:252)
...
==23495== Invalid read of size 8
==23495==    at 0x402C070: memcpy@@GLIBC_2.14 (mc_replace_strmem.c:877)
==23495==    by 0x674C6D: char* std::string::_S_construct<char const*>(char
const*, char const*, std::allocator<char> const&, std::forward_iterator_tag)
(in /usr/x86_64-pc-li
nux-gnu/binutils-bin/git/ld)
==23495==    by 0x674F79: std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)
(in /usr/x86_64-pc-li
nux-gnu/binutils-bin/git/ld)
==23495==    by 0x5B8617: gold::Plugin_manager::add_input_file(char const*,
bool) (options.h:1717)
==23495==    by 0x41EE5EA: all_symbols_read_hook() (gold-plugin.cpp:444)
==23495==    by 0x5B7946:
gold::Plugin_manager::all_symbols_read(gold::Workqueue*, gold::Task*,
gold::Input_objects*, gold::Symbol_table*, gold::Dirsearch*, gold::Mapfile*, g
old::Task_token**) (plugin.cc:359)
==23495==    by 0x5B7A73: gold::Plugin_hook::run(gold::Workqueue*)
(plugin.cc:1420)
==23495==    by 0x609C3C: gold::Workqueue::find_and_run_task(int)
(workqueue.cc:319)
==23495==    by 0x609FC9: gold::Workqueue::process(int) (workqueue.cc:495)
==23495==    by 0x4069EF: main (main.cc:252)
==23495==  Address 0x544f1f0 is 32 bytes inside a block of size 47 free'd
==23495==    at 0x4028FF8: operator delete(void*) (vg_replace_malloc.c:480)
==23495==    by 0x5D3C92C: LTOCodeGenerator::~LTOCodeGenerator()
(basic_string.h:249)
==23495==    by 0x5C6121D: lto_codegen_dispose (lto.cpp:213)
==23495==    by 0x41EE56B: all_symbols_read_hook() (gold-plugin.cpp:435)
==23495==    by 0x5B7946:
gold::Plugin_manager::all_symbols_read(gold::Workqueue*, gold::Task*,
gold::Input_objects*, gold::Symbol_table*, gold::Dirsearch*, gold::Mapfile*, g
old::Task_token**) (plugin.cc:359)
==23495==    by 0x5B7A73: gold::Plugin_hook::run(gold::Workqueue*)
(plugin.cc:1420)
==23495==    by 0x609C3C: gold::Workqueue::find_and_run_task(int)
(workqueue.cc:319)
==23495==    by 0x609FC9: gold::Workqueue::process(int) (workqueue.cc:495)
==23495==    by 0x4069EF: main (main.cc:252)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131016/ce48d592/attachment.html>


More information about the llvm-bugs mailing list