root icon indicating copy to clipboard operation
root copied to clipboard

core: Disable check for already deleted object.

Open pcanal opened this issue 3 years ago • 62 comments

On some platform operator delete taints the memory, so even right after the deletion the information stored by ~TObject is already erased. On those platform we no longer rely on the kNotDelete bit hack and rely on the system (which has tainted the memory assumingly for a reason) to detect the use-after-delete problems.

Introduce 2 new functions.

TObject::IsDestructed (used by TClonesArray) that detects that the destructor has been run and is active in all configuration. This should be used if the code knows that the memory has not been freed/deleted.

ROOT::Detail::HasBeenDeleted(TObject*) with returns true if the platform does not taint the memory and if the kNotDeleted is not set (in all other case, it returns false)

This fixes #11330

pcanal avatar Sep 08 '22 21:09 pcanal

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac1015/cxx17, mac11/cxx14, windows10/cxx14 How to customize builds

phsft-bot avatar Sep 08 '22 21:09 phsft-bot

Build failed on ROOT-debian10-i386/soversion. Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build See console output.

phsft-bot avatar Sep 08 '22 22:09 phsft-bot

Build failed on windows10/cxx14. Running on null:C:\build\workspace\root-pullrequests-build See console output.

phsft-bot avatar Sep 08 '22 22:09 phsft-bot

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac1015/cxx17, mac11/cxx14, windows10/cxx14 How to customize builds

phsft-bot avatar Sep 08 '22 23:09 phsft-bot

Build failed on ROOT-debian10-i386/soversion. Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build See console output.

phsft-bot avatar Sep 08 '22 23:09 phsft-bot

Build failed on windows10/cxx14. Running on null:C:\build\workspace\root-pullrequests-build See console output.

phsft-bot avatar Sep 08 '22 23:09 phsft-bot

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac1015/cxx17, mac11/cxx14, windows10/cxx14 How to customize builds

phsft-bot avatar Sep 09 '22 00:09 phsft-bot

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac1015/cxx17, mac11/cxx14, windows10/cxx14 How to customize builds

phsft-bot avatar Sep 09 '22 00:09 phsft-bot

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac1015/cxx17, mac11/cxx14, windows10/cxx14 How to customize builds

phsft-bot avatar Sep 09 '22 00:09 phsft-bot

Build failed on windows10/cxx14. Running on null:C:\build\workspace\root-pullrequests-build See console output.

Errors:

  • [2022-09-09T01:51:17.373Z] C:\build\workspace\root-pullrequests-build\build\bin\libNet.dll : fatal error LNK1120: 1 unresolved externals [C:\build\workspace\root-pullrequests-build\build\net\net\Net.vcxproj]
  • [2022-09-09T01:55:10.720Z] C:\build\workspace\root-pullrequests-build\build\bin\libHist.dll : fatal error LNK1120: 1 unresolved externals [C:\build\workspace\root-pullrequests-build\build\hist\hist\Hist.vcxproj]

phsft-bot avatar Sep 09 '22 01:09 phsft-bot

Build failed on ROOT-debian10-i386/soversion. Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build See console output.

Failing tests:

phsft-bot avatar Sep 09 '22 02:09 phsft-bot

Build failed on mac1015/cxx17. Running on macitois22.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build See console output.

Failing tests:

phsft-bot avatar Sep 09 '22 04:09 phsft-bot

@phsft-bot build with flags -DCTEST_TEST_EXCLUDE_NONE=On

pcanal avatar Sep 09 '22 16:09 pcanal

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac1015/cxx17, mac11/cxx14, windows10/cxx14 with flags -DCTEST_TEST_EXCLUDE_NONE=On How to customize builds

phsft-bot avatar Sep 09 '22 16:09 phsft-bot

Build failed on windows10/cxx14. Running on null:C:\build\workspace\root-pullrequests-build See console output.

Errors:

  • [2022-09-09T16:56:38.875Z] C:\build\workspace\root-pullrequests-build\build\bin\libNet.dll : fatal error LNK1120: 1 unresolved externals [C:\build\workspace\root-pullrequests-build\build\net\net\Net.vcxproj]
  • [2022-09-09T17:00:19.731Z] C:\build\workspace\root-pullrequests-build\build\bin\libHist.dll : fatal error LNK1120: 1 unresolved externals [C:\build\workspace\root-pullrequests-build\build\hist\hist\Hist.vcxproj]

phsft-bot avatar Sep 09 '22 17:09 phsft-bot

Build failed on ROOT-performance-centos8-multicore/cxx17. Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build See console output.

Failing tests:

phsft-bot avatar Sep 09 '22 17:09 phsft-bot

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac1015/cxx17, mac11/cxx14, windows10/cxx14 How to customize builds

phsft-bot avatar Sep 09 '22 23:09 phsft-bot

Build failed on ROOT-performance-centos8-multicore/cxx17. Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build See console output.

Failing tests:

phsft-bot avatar Sep 10 '22 00:09 phsft-bot

Build failed on windows10/cxx14. Running on null:C:\build\workspace\root-pullrequests-build See console output.

Failing tests:

phsft-bot avatar Sep 10 '22 01:09 phsft-bot

Build failed on ROOT-ubuntu2004/python3. Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.

Failing tests:

phsft-bot avatar Sep 10 '22 01:09 phsft-bot

Build failed on ROOT-ubuntu18.04/nortcxxmod. Running on sft-ubuntu-1804-3.cern.ch:/build/workspace/root-pullrequests-build See console output.

Failing tests:

phsft-bot avatar Sep 10 '22 01:09 phsft-bot