Issue |
129900
|
Summary |
Assertion failure in operator delete of llvm::User
|
Labels |
llvm:ir
|
Assignees |
marcauberer
|
Reporter |
marcauberer
|
Commit https://github.com/llvm/llvm-project/commit/e3f936eb755d9ae37019ffcc7f53d71d2d58d188 introduces a functional regression. If operator new fails, and then operator delete is called, we run into the following assertion. This was caught by malfunction tests:
https://github.com/llvm/llvm-project/blob/main/llvm/lib/IR/User.cpp#L190
Reverting the removal of:
```cpp
Obj->NumUserOperands = Us;
Obj->HasHungOffUses = false;
Obj->HasDescriptor = DescBytes != 0;
```
respecively
```cpp
Obj->NumUserOperands = 0;
Obj->HasHungOffUses = true;
Obj->HasDescriptor = false;
```
I will prepare a patch for that.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs