Re: [PATCH 15/20] chainimpl.h: Add _Assert() to _Chain_Initialize_empty()

2014-11-28 Thread Peter Dufault
> On Nov 26, 2014, at 13:55 , Gedare Bloom wrote: > > I guess the difference is whether the assert implies a local > assumption (I require this var is not NULL) or a global one (This var > has been previously verified to be not NULL). It may be worth > classifying asserts in those two categories

Re: [PATCH 15/20] chainimpl.h: Add _Assert() to _Chain_Initialize_empty()

2014-11-26 Thread Gedare Bloom
On Wed, Nov 26, 2014 at 12:32 PM, Peter Dufault wrote: > >> On Nov 26, 2014, at 11:40 , Gedare Bloom wrote: >> >> What is the difference between the previous two variants? Would you >> expect to optimize out "Assert_known" in all production code? >> > > "Assert_known_not_NULL" implies that either

Re: [PATCH 15/20] chainimpl.h: Add _Assert() to _Chain_Initialize_empty()

2014-11-26 Thread Peter Dufault
> On Nov 26, 2014, at 11:40 , Gedare Bloom wrote: > > What is the difference between the previous two variants? Would you > expect to optimize out "Assert_known" in all production code? > "Assert_known_not_NULL" implies that either someone broke the code (the known assertion no longer applies

Re: [PATCH 15/20] chainimpl.h: Add _Assert() to _Chain_Initialize_empty()

2014-11-26 Thread Joel Sherrill
On November 26, 2014 10:29:26 AM CST, Peter Dufault wrote: >These are minor nits, but I'll bring them up anyway because as I review >these changes I keep thinking about them. > >If you have a small-codespace target that can togenerate faults on >low-address-space accesses then these NULL derefer

Fwd: [PATCH 15/20] chainimpl.h: Add _Assert() to _Chain_Initialize_empty()

2014-11-26 Thread Gedare Bloom
On Wed, Nov 26, 2014 at 11:29 AM, Peter Dufault wrote: > These are minor nits, but I'll bring them up anyway because as I review these > changes I keep thinking about them. > > If you have a small-codespace target that can togenerate faults on > low-address-space accesses then these NULL derefer

Re: [PATCH 15/20] chainimpl.h: Add _Assert() to _Chain_Initialize_empty()

2014-11-26 Thread Peter Dufault
These are minor nits, but I'll bring them up anyway because as I review these changes I keep thinking about them. If you have a small-codespace target that can togenerate faults on low-address-space accesses then these NULL dereferences are going to be caught in the exception handler and don't

[PATCH 15/20] chainimpl.h: Add _Assert() to _Chain_Initialize_empty()

2014-11-25 Thread Joel Sherrill
From: Josh Oguin CodeSonar flagged this as a potential NULL deference. That should never occur but adding the _Assert() ensures we are checking that. --- cpukit/score/include/rtems/score/chainimpl.h | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cpukit/score/inc