Commit fb32166
Add cLockAllowLeak attribute to RSLock and use it on DbgTransportTarget lock
The static g_DbgTransportTarget instance is destroyed after the host process's
main() returns. On Unix the dynamic loader does not invoke DbgDllMain
DLL_PROCESS_DETACH for mscordbi, so DbgTransportTarget::Shutdown() may never run
and the embedded RSLock m_sLock is left initialized at static destruction. The
RSLock destructor then asserts on the leak in checked builds and the host
aborts with exit 134, marking otherwise successful debugger tests as failures.
Add a new cLockAllowLeak bit to RSLock::ELockAttr. The destructor honors it by
suppressing the leak assert. Init the DbgTransportTarget lock with this bit set
to opt out of the assert, with a comment that the missing Shutdown call on Linux
is technically a bug tracked separately as low priority.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 6820c80 commit fb32166
3 files changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
719 | 723 | | |
720 | 724 | | |
721 | 725 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
508 | | - | |
509 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
| |||
0 commit comments