https://bugs.kde.org/show_bug.cgi?id=517544
Bug ID: 517544
Summary: Crash running clazy after latest update
Classification: Developer tools
Product: clazy
Version First unspecified
Reported In:
Platform: Ubuntu
OS: Linux
Status: REPORTED
Severity: crash
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
Hi.
I'm attempting incorporate the clazy checks, and am hitting some problems. I am
running the latest build of clazy with a build off llvm from a few days ago.
The first is a crash in compare-member-check.cpp. At line 76
`memberDecl->getBody()` can be a nullptr. I've worked around this be adding a
non-null for a valid body just after the check for a non-null `methodDecl`
The second issue, which I haven't tracked down, looks like memory corruption.
This is the output of running clang-tidy
```
suppressed 2069 warnings (1965 in non-user code, 104 NOLINT).
Use -header-filter=.* or leave it as default to display errors from all
non-system headers. Use -system-headers to display errors from system headers
as well.
64 warnings treated as errors
double free or corruption (out)
pure virtual method called
terminate called without an active exception
```
The backtrace looks like this:
```
(gdb) bt
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)
at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=<optimized out>) at
./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at
./nptl/pthread_kill.c:89
#3 0x000075a570c4527e in __GI_raise (sig=sig@entry=6) at
../sysdeps/posix/raise.c:26
#4 0x000075a570c288ff in __GI_abort () at ./stdlib/abort.c:79
#5 0x000075a5710a5ff5 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x000075a5710bb0da in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x000075a5710a5a55 in std::terminate() () from
/lib/x86_64-linux-gnu/libstdc++.so.6
#8 0x000075a5710bbfc3 in __cxa_pure_virtual () from
/lib/x86_64-linux-gnu/libstdc++.so.6
#9 0x00005c656f84ee53 in llvm::raw_ostream::write(char const*, unsigned long)
()
#10 0x00005c656f7c06f5 in CrashHandler(void*) ()
#11 0x00005c656f876e22 in SignalHandler(int, siginfo_t*, void*) ()
#12 <signal handler called>
#13 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)
at ./nptl/pthread_kill.c:44
#14 __pthread_kill_internal (signo=6, threadid=<optimized out>) at
./nptl/pthread_kill.c:78
#15 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at
./nptl/pthread_kill.c:89
#16 0x000075a570c4527e in __GI_raise (sig=sig@entry=6) at
../sysdeps/posix/raise.c:26
#17 0x000075a570c288ff in __GI_abort () at ./stdlib/abort.c:79
#18 0x000075a570c297b6 in __libc_message_impl (fmt=fmt@entry=0x75a570dce8d7
"%s\n") at ../sysdeps/posix/libc_fatal.c:134
#19 0x000075a570ca8ff5 in malloc_printerr (str=str@entry=0x75a570dd1ac0 "double
free or corruption (out)") at ./malloc/malloc.c:5775
#20 0x000075a570cab120 in _int_free_merge_chunk (av=0x75a570e03ac0
<main_arena>, p=0x5c6575bf3bb0, size=3348818201477082720) at
./malloc/malloc.c:4676
#21 0x000075a570caddce in __GI___libc_free (mem=0x5c6575bf3bc0) at
./malloc/malloc.c:3398
#22 0x00005c656b95f5a7 in llvm::StringSet<llvm::MallocAllocator>::~StringSet()
()
#23 0x000075a570c47a76 in __run_exit_handlers (status=1, listp=<optimized out>,
run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at
./stdlib/exit.c:108
#24 0x000075a570c47bbe in __GI_exit (status=<optimized out>) at
./stdlib/exit.c:138
#25 0x000075a570c2a1d1 in __libc_start_call_main
(main=main@entry=0x5c656b4ffad0 <main>, argc=argc@entry=3,
argv=argv@entry=0x7ffee2bd1f78) at ../sysdeps/nptl/libc_start_call_main.h:74
#26 0x000075a570c2a28b in __libc_start_main_impl (main=0x5c656b4ffad0 <main>,
argc=3, argv=0x7ffee2bd1f78, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7ffee2bd1f68) at ../csu/libc-start.c:360
#27 0x00005c656b56c4b5 in _start ()
```
This only happens when the clazy module is loaded.
--
You are receiving this mail because:
You are watching all bug changes.