mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-08 21:10:35 +00:00
Rollback of commit "Repress sanitization on User dtor."
This would have suppressed bug 24578, about use-after- destroy on User and MDNode. Rolled back suppression for the sake of code cleanliness, in preferance for bug tracking to keep track of this issue. This reverts commit 6ff2baabc4625d5b0a8dccf76aa0f72d930ea6c0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246484 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fb62ba2fd3
commit
950c00954a
@ -72,7 +72,8 @@ protected:
|
||||
void growHungoffUses(unsigned N, bool IsPhi = false);
|
||||
|
||||
public:
|
||||
~User() override {}
|
||||
~User() override {
|
||||
}
|
||||
/// \brief Free memory allocated for User and Use objects.
|
||||
void operator delete(void *Usr);
|
||||
/// \brief Placement delete - required by std, but never called.
|
||||
|
@ -323,12 +323,10 @@
|
||||
#if __has_feature(memory_sanitizer)
|
||||
# define LLVM_MEMORY_SANITIZER_BUILD 1
|
||||
# include <sanitizer/msan_interface.h>
|
||||
# define LLVM_NO_SANITIZE_MEMORY_ATTRIBUTE __attribute__((no_sanitize_memory))
|
||||
#else
|
||||
# define LLVM_MEMORY_SANITIZER_BUILD 0
|
||||
# define __msan_allocated_memory(p, size)
|
||||
# define __msan_unpoison(p, size)
|
||||
# define LLVM_NO_SANITIZE_MEMORY_ATTRIBUTE
|
||||
#endif
|
||||
|
||||
/// \macro LLVM_ADDRESS_SANITIZER_BUILD
|
||||
|
@ -401,9 +401,7 @@ void *MDNode::operator new(size_t Size, unsigned NumOps) {
|
||||
return Ptr;
|
||||
}
|
||||
|
||||
// Repress memory sanitization, due to use-after-destroy by operator
|
||||
// delete. Bug report 24578 identifies this issue.
|
||||
LLVM_NO_SANITIZE_MEMORY_ATTRIBUTE void MDNode::operator delete(void *Mem) {
|
||||
void MDNode::operator delete(void *Mem) {
|
||||
MDNode *N = static_cast<MDNode *>(Mem);
|
||||
size_t OpSize = N->NumOperands * sizeof(MDOperand);
|
||||
OpSize = RoundUpToAlignment(OpSize, llvm::alignOf<uint64_t>());
|
||||
|
@ -118,9 +118,7 @@ void *User::operator new(size_t Size) {
|
||||
// User operator delete Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// Repress memory sanitization, due to use-after-destroy by operator
|
||||
// delete. Bug report 24578 identifies this issue.
|
||||
LLVM_NO_SANITIZE_MEMORY_ATTRIBUTE void User::operator delete(void *Usr) {
|
||||
void User::operator delete(void *Usr) {
|
||||
// Hung off uses use a single Use* before the User, while other subclasses
|
||||
// use a Use[] allocated prior to the user.
|
||||
User *Obj = static_cast<User *>(Usr);
|
||||
|
Loading…
Reference in New Issue
Block a user