VirtualBox

Changeset 96809 in vbox


Ignore:
Timestamp:
Sep 21, 2022 11:07:22 AM (2 years ago)
Author:
vboxsync
Message:

IPRT/thread.cpp: Avoid endless recursion during early IPRT init phase when all logging is enabled. bugref:10261

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/thread.cpp

    r96407 r96809  
    335335        rc = rtThreadAdopt(enmType, fFlags, 0, pszName);
    336336        Thread = RTThreadSelf();
    337         Log(("RTThreadAdopt: %RTthrd %RTnthrd '%s' enmType=%d fFlags=%#x rc=%Rrc\n",
    338              Thread, RTThreadNativeSelf(), pszName, enmType, fFlags, rc));
     337
     338        /* Don't too early during init, as rtLogLock may end up here and cause endless recursion. */
     339        if (rc != VERR_FAILED_TO_SET_SELF_TLS)
     340            Log(("RTThreadAdopt: %RTthrd %RTnthrd '%s' enmType=%d fFlags=%#x rc=%Rrc\n",
     341                 Thread, RTThreadNativeSelf(), pszName, enmType, fFlags, rc));
    339342    }
    340343    else
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette