Files
reactos/sdk/lib
Timo Kreuzer fe7a58d92e [RTL] Update CountOfOwnedCriticalSections in the TEB
Useful for debugging.
Motivation: With SMP on x64 I found a number of instances where critical sections would be left abandoned, causing lockups. From what I can tell it was exceptions inside rpcrt4, which leave the process in a blocked state. Might or might not be related to x64 / SMP.

For real value, you still need to put checks at certain places manually, but this is not super straight forward, because there can be false positives, e.g. when a process is terminated due to an exception, where the abandoned lock is acceptable, and we have this during testing. It's difficult to 100% distinguish this from silent and very bad lock leaks.

Problematic code:

    __try
    {
        SomeFunction(); // throws an exception with a CS held, e.g. heap code
    }
    __except(1)
    {
        DPRINT1("Oops. let's just pretend it's all ok!\n");
    }
2025-01-18 21:15:17 +02:00
..
2025-01-14 13:34:24 +02:00
2024-04-27 22:51:34 +02:00
2022-03-15 22:54:17 -04:00
2024-10-24 18:39:50 +03:00
2023-12-23 21:37:08 +01:00
2019-09-19 02:39:59 +02:00
2025-01-16 14:18:53 +02:00
2025-01-16 14:18:53 +02:00