[ros-dev] [ros-diffs] [dchapyshev] 72787: [NTOSKRNL] Remove unneeded sanity checks

Alex Ionescu ionucu at videotron.ca
Mon Sep 26 01:15:32 UTC 2016


There are no disadvantages. Someone though it would be fun to remove
useful assertions because they don't really understand them.
Best regards,
Alex Ionescu


On Sat, Sep 24, 2016 at 9:23 AM, Michael Fritscher
<michael at fritscher.net> wrote:
> Hi,
>
> hmm, what are disadvantages of these checks? If MS uses them as well these
> shouldn't break anything.
>
> Perfomancewise there shouldn't be a difference, and in release builds they
> are disabled anyways, aren't they?
>
> I only want to get a better unterstanding ;-)
>
> Best regards,
> Michael
>
>> Thanks for removing stuff that exists in the NT kernel as sanity
>> checks -- the entire MS dev team must be wrong, thanks for correcting
>> them all :)
>>
>> Make sure not to ask "anyone can explain these checks? they seem
>> useless to me" when removing stuff like this.
>> Best regards,
>> Alex Ionescu
>>
>>
>> On Sat, Sep 24, 2016 at 2:30 AM,  <dchapyshev at svn.reactos.org> wrote:
>>> Author: dchapyshev
>>> Date: Sat Sep 24 09:30:06 2016
>>> New Revision: 72787
>>>
>>> URL: http://svn.reactos.org/svn/reactos?rev=72787&view=rev
>>> Log:
>>> [NTOSKRNL] Remove unneeded sanity checks
>>>
>>> Modified:
>>>     trunk/reactos/ntoskrnl/include/internal/ke_x.h
>>>
>>> Modified: trunk/reactos/ntoskrnl/include/internal/ke_x.h
>>> URL:
>>> http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/ke_x.h?rev=72787&r1=72786&r2=72787&view=diff
>>> ==============================================================================
>>> --- trunk/reactos/ntoskrnl/include/internal/ke_x.h      [iso-8859-1]
>>> (original)
>>> +++ trunk/reactos/ntoskrnl/include/internal/ke_x.h      [iso-8859-1] Sat
>>> Sep 24 09:30:06 2016
>>> @@ -25,7 +25,6 @@
>>>                                                                              \
>>>      /* Sanity checks */
>>>     \
>>>      ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
>>>     \
>>> -    ASSERT(_Thread == KeGetCurrentThread());
>>>     \
>>>      ASSERT((_Thread->SpecialApcDisable <= 0) &&
>>>     \
>>>             (_Thread->SpecialApcDisable != -32768));
>>>     \
>>>                                                                              \
>>> @@ -42,7 +41,6 @@
>>>                                                                              \
>>>      /* Sanity checks */
>>>     \
>>>      ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
>>>     \
>>> -    ASSERT(_Thread == KeGetCurrentThread());
>>>     \
>>>      ASSERT(_Thread->SpecialApcDisable < 0);
>>>     \
>>>                                                                              \
>>>      /* Leave region and check if APCs are OK now */
>>>     \
>>> @@ -66,7 +64,6 @@
>>>      PKTHREAD _Thread = KeGetCurrentThread();
>>>     \
>>>                                                                              \
>>>      /* Sanity checks */
>>>     \
>>> -    ASSERT(_Thread == KeGetCurrentThread());
>>>     \
>>>      ASSERT((_Thread->KernelApcDisable <= 0) &&
>>>     \
>>>             (_Thread->KernelApcDisable != -32768));
>>>     \
>>>                                                                              \
>>> @@ -82,7 +79,6 @@
>>>      PKTHREAD _Thread = KeGetCurrentThread();
>>>     \
>>>                                                                              \
>>>      /* Sanity checks */
>>>     \
>>> -    ASSERT(_Thread == KeGetCurrentThread());
>>>     \
>>>      ASSERT(_Thread->KernelApcDisable < 0);
>>>     \
>>>                                                                              \
>>>      /* Enable Kernel APCs */
>>>     \
>>>
>>>
>>
>> _______________________________________________
>> Ros-dev mailing list
>> Ros-dev at reactos.org
>> http://www.reactos.org/mailman/listinfo/ros-dev
>
>
>
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev



More information about the Ros-dev mailing list