Skip to content

Commit

Permalink
Drop redundant MarkAsIntentionallyLeaked
Browse files Browse the repository at this point in the history
commit_hash:a7e152eae3d2996e60fa5940906933bfb64bdc88
  • Loading branch information
babenko committed Oct 8, 2024
1 parent 91c391f commit 763d219
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions library/cpp/yt/memory/leaky_ref_counted_singleton-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ TIntrusivePtr<T> LeakyRefCountedSingleton(TArgs&&... args)
auto ptr = New<T>(std::forward<TArgs>(args)...);
Ref(ptr.Get());
Ptr.store(ptr.Get());
#if defined(_asan_enabled_)
NSan::MarkAsIntentionallyLeaked(ptr.Get());
#endif
});

return Ptr.load();
Expand Down
3 changes: 0 additions & 3 deletions yt/yt/python/yson/serialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,8 @@ void SerializePythonInteger(const Py::Object& obj, IYsonConsumer* consumer, TCon
// TODO(asaitgalin): Make singleton with all global variables and
// free all objects there before interpreter exit.
static auto* SignedInt64Min = PyLong_FromLongLong(std::numeric_limits<i64>::min());
NSan::MarkAsIntentionallyLeaked(SignedInt64Min);
static auto* SignedInt64Max = PyLong_FromLongLong(std::numeric_limits<i64>::max());
NSan::MarkAsIntentionallyLeaked(SignedInt64Max);
static auto* UnsignedInt64Max = PyLong_FromUnsignedLongLong(std::numeric_limits<ui64>::max());
NSan::MarkAsIntentionallyLeaked(UnsignedInt64Max);

if (PyObject_RichCompareBool(UnsignedInt64Max, obj.ptr(), Py_LT) == 1 ||
PyObject_RichCompareBool(obj.ptr(), SignedInt64Min, Py_LT) == 1)
Expand Down

0 comments on commit 763d219

Please sign in to comment.