https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67239

--- Comment #17 from H.J. Lu <hjl.tools at gmail dot com> ---
It is related to PR 68355. With -finline-small-functions,  we call

std::_Hashtable<int, int, __gnu_cxx::throw_allocator_limit<int>,
std::__detail::_Identity, std::equal_to<int>, std::hash<int>,
std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash,
std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false,
true, true> >::_M_rehash_aux(unsigned int, std::integral_constant<bool, true>)

with

        movq    %rdi, %rbx 
        movq    %rdx, %r14 
        subl    $8, %esp 
        pushq   $0   
.LEHB23:
        .cfi_escape 0x2e,0x10
        call   
_ZNSt10_HashtableIiiN9__gnu_cxx21throw_allocator_limitIiEENSt8__detail9_IdentityESt8equal_toIiESt4hashIiENS3_18_Mod_range_hashingENS3_20_Default_ranged_hashENS3_20_Prime_rehash_policyENS3_17_Hashtable_traitsILb0ELb1ELb1EEEE13_M_rehash_auxEjSt17integral_constantIbLb1EE
.LEHE23:

and we generate:

_ZNSt10_HashtableIiiN9__gnu_cxx21throw_allocator_limitIiEENSt8__detail9_IdentityESt8equal_toIiESt4hashIiENS3_18_Mod_range_hashingENS3_20_Default_ranged_hashENS3_20_Prime_rehash_policyENS3_17_Hashtable_traitsILb0ELb1ELb1EEEE13_M_rehash_auxEjSt17integral_constantIbLb1EE:
.LFB9712:
        .cfi_startproc
        .cfi_personality 0x3,__gxx_personality_v0
        .cfi_lsda 0x3,.LLSDA9712
        pushq   %r15
        .cfi_def_cfa_offset 16
        .cfi_offset 15, -16
        pushq   %r14
        .cfi_def_cfa_offset 24
        .cfi_offset 14, -24
        pushq   %r13
        .cfi_def_cfa_offset 32
        .cfi_offset 13, -32
        pushq   %r12
        .cfi_def_cfa_offset 40
        .cfi_offset 12, -40
        pushq   %rbp
        .cfi_def_cfa_offset 48
        .cfi_offset 6, -48
        pushq   %rbx
        .cfi_def_cfa_offset 56
        .cfi_offset 3, -56
        subl    $136, %esp
        .cfi_def_cfa_offset 192
        movq    %rdi, %r15
        movl    %esi, %r12d
        cmpl    $1, %esi

Change

.cfi_escape 0x2e,0x10

to

.cfi_escape 0x2e,0

fixes the crash.  It seems that empty argument, like std::true_type, isn't
handled properly.

Reply via email to