[llvm-bugs] [Bug 51853] New: llvm-profgen: Program received signal SIGSEGV, Segmentation fault.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 14 08:40:37 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=51853

            Bug ID: 51853
           Summary: llvm-profgen: Program received signal SIGSEGV,
                    Segmentation fault.
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: opt
          Assignee: unassignedbugs at nondot.org
          Reporter: xuqingqing.0729 at bytedance.com
                CC: llvm-bugs at lists.llvm.org

Reading symbols from
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm_install/bin/llvm-profgen...done.
(gdb) r
Starting program:
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm_install/bin/llvm-profgen
--perfscript=easy.perf.script --binary=../500.perlbench_r
--output=000.spgo.profraw --format=text
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000555555b8c579 in llvm::hashing::detail::fetch64 (p=0x555561bbd000 <error:
Cannot access memory at address 0x555561bbd000>)
    at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ADT/Hashing.h:150
150       memcpy(&result, p, sizeof(result));
(gdb) bt
#0  0x0000555555b8c579 in llvm::hashing::detail::fetch64 (p=0x555561bbd000
<error: Cannot access memory at address 0x555561bbd000>)
    at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ADT/Hashing.h:150
#1  0x0000555555b8cf21 in llvm::hashing::detail::hash_state::mix
(this=0x7fffffffd590, s=0x555561bbcfd0 "")
    at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ADT/Hashing.h:295
#2  0x00005555563fc365 in llvm::hashing::detail::hash_combine_range_impl<char
const> (first=0x5555599f7b10 "Perl_gv_fetchpvn_flags",
    last=0xaaaabb26b290 <error: Cannot access memory at address
0xaaaabb26b290>) at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ADT/Hashing.h:462
#3  0x00005555563fc011 in llvm::hash_combine_range<char const*>
(first=0x5555599f7b10 "Perl_gv_fetchpvn_flags", last=0xaaaabb26b290 <error:
Cannot access memory at address 0xaaaabb26b290>)
    at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ADT/Hashing.h:483
#4  0x00005555563fb9b5 in llvm::hash_value (S=...) at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/lib/Support/StringRef.cpp:598
#5  0x0000555555b97610 in
llvm::hashing::detail::get_hashable_data<llvm::StringRef> (value=...) at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ADT/Hashing.h:378
#6  0x0000555555b9402a in
llvm::hashing::detail::hash_combine_recursive_helper::combine<llvm::StringRef,
unsigned int, unsigned int> (this=0x7fffffffd700, length=0,
buffer_ptr=0x7fffffffd700 "",
    buffer_end=0x7fffffffd740 "", arg=..., args#0=@0x7fffffffddb0: 26,
args#1=@0x7fffffffddb4: 0) at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ADT/Hashing.h:559
#7  0x0000555555b90b32 in llvm::hash_combine<llvm::StringRef, unsigned int,
unsigned int> (args#0=..., args#1=@0x7fffffffddb0: 26, args#2=@0x7fffffffddb4:
0)
    at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ADT/Hashing.h:607
#8  0x0000555555b8dded in llvm::sampleprof::hash_value (arg=...) at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ProfileData/SampleProf.h:447
#9  0x0000555555b97804 in
llvm::hashing::detail::get_hashable_data<llvm::sampleprof::SampleContextFrame>
(value=...)
    at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ADT/Hashing.h:378
#10 0x0000555555b940df in
llvm::hashing::detail::hash_combine_range_impl<llvm::sampleprof::SampleContextFrame
const*> (first=0x7fffffffdda0, last=0x7fffffffddb8)
    at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ADT/Hashing.h:411
#11 0x0000555555b90baf in
llvm::hash_combine_range<llvm::sampleprof::SampleContextFrame const*>
(first=0x7fffffffdda0, last=0x7fffffffddb8)
    at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ADT/Hashing.h:483
#12 0x0000555555b90c9e in
llvm::hash_value<llvm::sampleprof::SampleContextFrame> (S=...) at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:571
#13 0x0000555555ba4e25 in llvm::sampleprof::SampleContext::getHashCode
(this=0x555561bae4b8)
    at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ProfileData/SampleProf.h:586
#14 0x0000555555ba4efa in llvm::sampleprof::SampleContext::Hash::operator()
(this=0x7fffffffdb60, Context=...)
    at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/include/llvm/ProfileData/SampleProf.h:637
#15 0x0000555555ba9a24 in
std::__detail::_Hash_code_base<llvm::sampleprof::SampleContext,
std::pair<llvm::sampleprof::SampleContext const,
llvm::sampleprof::FunctionSamples>, std::__detail::_Select1st,
llvm::sampleprof::SampleContext::Hash, std::__detail::_Mod_range_hashing,
std::__detail::_Default_ranged_hash, true>::_M_hash_code (this=0x7fffffffdb60,
__k=...)
    at /usr/include/c++/8/bits/hashtable_policy.h:1387
#16 0x0000555555bd8544 in std::_Hashtable<llvm::sampleprof::SampleContext,
std::pair<llvm::sampleprof::SampleContext const,
llvm::sampleprof::FunctionSamples>,
std::allocator<std::pair<llvm::sampleprof::SampleContext const,
llvm::sampleprof::FunctionSamples> >, std::__detail::_Select1st,
std::equal_to<llvm::sampleprof::SampleContext>,
llvm::sampleprof::SampleContext::Hash, std::__detail::_Mod_range_hashing,
std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy,
std::__detail::_Hashtable_traits<true, false, true>
>::_M_emplace<llvm::ArrayRef<llvm::sampleprof::SampleContextFrame>&,
llvm::sampleprof::FunctionSamples> (this=0x7fffffffdb60, __args#0=...,
__args#1=...) at /usr/include/c++/8/bits/hashtable.h:1665
#17 0x0000555555bd5dcf in std::_Hashtable<llvm::sampleprof::SampleContext,
std::pair<llvm::sampleprof::SampleContext const,
llvm::sampleprof::FunctionSamples>,
std::allocator<std::pair<llvm::sampleprof::SampleContext const,
llvm::sampleprof::FunctionSamples> >, std::__detail::_Select1st,
std::equal_to<llvm::sampleprof::SampleContext>,
llvm::sampleprof::SampleContext::Hash, std::__detail::_Mod_range_hashing,
std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy,
std::__detail::_Hashtable_traits<true, false, true>
>::emplace<llvm::ArrayRef<llvm::sampleprof::SampleContextFrame>&,
llvm::sampleprof::FunctionSamples> (this=0x7fffffffdb60, __args#0=...,
__args#1=...) at /usr/include/c++/8/bits/hashtable.h:748
#18 0x0000555555bd3c96 in std::unordered_map<llvm::sampleprof::SampleContext,
llvm::sampleprof::FunctionSamples, llvm::sampleprof::SampleContext::Hash,
std::equal_to<llvm::sampleprof::SampleContext>,
std::allocator<std::pair<llvm::sampleprof::SampleContext const,
llvm::sampleprof::FunctionSamples> >
>::emplace<llvm::ArrayRef<llvm::sampleprof::SampleContextFrame>&,
llvm::sampleprof::FunctionSamples> (
    this=0x7fffffffdb60, __args#0=..., __args#1=...) at
/usr/include/c++/8/bits/unordered_map.h:388
#19 0x00005555562ff167 in
llvm::sampleprof::SampleContextTrimmer::trimAndMergeColdContextProfiles
(this=0x7fffffffde68, ColdCountThreshold=1, TrimColdContext=false,
MergeColdContext=true,
    ColdContextFrameLength=1) at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/lib/ProfileData/SampleProf.cpp:360
#20 0x0000555555bcdf1e in
llvm::sampleprof::CSProfileGenerator::postProcessProfiles (this=0x555561873780)
    at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/tools/llvm-profgen/ProfileGenerator.cpp:418
#21 0x0000555555bcd36b in llvm::sampleprof::CSProfileGenerator::generateProfile
(this=0x555561873780)
    at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/tools/llvm-profgen/ProfileGenerator.cpp:253
#22 0x0000555555b7cbe4 in main (argc=5, argv=0x7fffffffe128) at
/data00/xqq/memtrace/cpu2017/llvm-version/debug-main/llvm-project/llvm/tools/llvm-profgen/llvm-profgen.cpp:104
(gdb) q

-- 
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/20210914/456e87b6/attachment.html>


More information about the llvm-bugs mailing list