Issue 239619
Summary [clang][ObjC][GNUstep] `objc_direct_members` on a category `@implementation` crashes CodeGen for the GNU runtimes
Labels crash, objective-c, generated by fuzzer
Assignees
Reporter YuanchengJiang
    The following code:
```objc
@interface A
@end
__attribute__((objc_direct_members))
@implementation A(foo)
- (void)foo_myStuff {}
@end
```

Resulted in this output:
```
clang: /root/llvm-project/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp:3196: llvm::Constant* {anonymous}::CGObjCGNU::GenerateMethodList(llvm::StringRef, llvm::StringRef, llvm::ArrayRef<const clang::ObjCMethodDecl*>, bool): Assertion `FnPtr && "Can't generate metadata for method that doesn't exist"' failed.
```

Trunk reproducer (`-x objective-c -emit-llvm -fobjc-runtime=gnustep-2.0`): https://godbolt.org/z/qjvcTxjxx
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to