bug-gnucap
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Segment fault at exit when compiled with Clang and libc++


From: LdBeth
Subject: Re: Segment fault at exit when compiled with Clang and libc++
Date: Wed, 31 Jan 2024 23:16:13 -0600
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (Gojō) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (x86_64-apple-darwin20.6.0) MULE/6.0 (HANACHIRUSATO)

>>>>> In <tencent_59FCFE0CDC28BA531DE77AE0304E748AAC09@qq.com> 
>>>>>   LdBeth <andpuke@foxmail.com> wrote:
ldb> Compiling the library with debug info can gives the backtrace.
ldb> Actually, there are two places cause the segfault. Their backtraces
ldb> leads to C++ std::less(), but I don't found that very helpful, so
ldb> I tried my best to isolate the problem.


I found the cause is this method in `l_indirect.h`

  size_t erase(void* b, void* e) {
    size_t c=0; 
    assert(b <= e);
    for (void* i=b; i<=e; i=reinterpret_cast<bool*>(i)+1) {
      c += _map.erase(i);
      }
    return c;
  }

Still, I have no idea on how to fix this.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]