https://bugs.llvm.org/show_bug.cgi?id=45548
Bug ID: 45548
Summary: Segmentation Fault in clang-tidy when analyzing
ownership
Product: new-bugs
Version: 10.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Created attachment 23360
--> https://bugs.llvm.org/attachment.cgi?id=23360&action=edit
crash file
$ clang-tidy-10 crash.c --
produces a segmentation fault
I have tried 7, 8 and 10 with the same results.
Please see attached, and here is the minimal code:
#include <stdio.h>
void __attribute((ownership_returns(my_malloc))) *malloc(size_t amt);
void __attribute((ownership_takes(malloc, 1))) free(void *ptr);
void __attribute((ownership_returns(my_malloc))) *my_malloc(size_t amt);
void test1() {
int *p = my_malloc(12);
free(p);
}
int main() {
return 0;
}
If I comment out the following line the segmentation fault goes away:
void __attribute((ownership_takes(malloc, 1))) free(void *ptr);
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs