This assertion fails:
configASSERT( xSize == sizeof( Queue_t ) );
in function xQueueGenericCreateStatic(), in "queue.c"
when this macro is set to 1:
configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES
The problem is that the opaque data structures in "FreeRTOS.h" are different from the real ones in "list.h"
This is the current source code (in "FreeRTOS.h"):
struct xSTATIC_LIST_ITEM
{
TickType_t xDummy1;
void *pvDummy2[ 4 ];
};
typedef struct xSTATIC_LIST_ITEM StaticListItem_t;
/* See the comments above the struct xSTATIC_LIST_ITEM definition. */
struct xSTATIC_MINI_LIST_ITEM
{
TickType_t xDummy1;
void *pvDummy2[ 2 ];
};
typedef struct xSTATIC_MINI_LIST_ITEM StaticMiniListItem_t;
/* See the comments above the struct xSTATIC_LIST_ITEM definition. */
typedef struct xSTATIC_LIST
{
UBaseType_t uxDummy1;
void *pvDummy2;
StaticMiniListItem_t xDummy3;
} StaticList_t;
And this is the fix I could implement:
struct xSTATIC_LIST_ITEM
{
#if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES
TickType_t xDummy0;
#endif
TickType_t xDummy1;
void *pvDummy2[ 4 ];
#if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES
TickType_t xDummy3;
#endif
};
typedef struct xSTATIC_LIST_ITEM StaticListItem_t;
/* See the comments above the struct xSTATIC_LIST_ITEM definition. */
struct xSTATIC_MINI_LIST_ITEM
{
#if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES
TickType_t xDummy0;
#endif
TickType_t xDummy1;
void *pvDummy2[ 2 ];
};
typedef struct xSTATIC_MINI_LIST_ITEM StaticMiniListItem_t;
/* See the comments above the struct xSTATIC_LIST_ITEM definition. */
typedef struct xSTATIC_LIST
{
#if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES
TickType_t xDummy0;
#endif
UBaseType_t uxDummy1;
void *pvDummy2;
StaticMiniListItem_t xDummy3;
#if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES
TickType_t xDummy4;
#endif
} StaticList_t;
Well, both the data integrity checks and the assertions are meant for
debugging, so it was weird not to have them coexist nicely.
Thanks for fixing it.
The latest code from SVN works fine.
As a side note, about the new code: in "StackMacros.h" you could use
pragma message("xyz") for MSVC, for the warning about the renaming of the
file.
On Wed, Feb 20, 2019 at 7:27 PM Richard Barry rtel@users.sourceforge.net
wrote:
Related
Bugs:
#188Thanks for taking the time to report - we were aware of this (from previous reports) but had opted 'not to fix' as the data integrity checks are really for debug rather than production. However as several folks have asked about this now it seems approprate to update. Can you please try the latest code from SVN (specifically the list.h file) and report back if it has fixed your issue (which it should have done, as we have tried with various different combinations - but want to make sure).
Thanks for taking the time to report - we were aware of this (from previous reports) but had opted 'not to fix' as the data integrity checks are really for debug rather than production. However as several folks have asked about this now it seems approprate to update. Can you please try the latest code from SVN (specifically the list.h file) and report back if it has fixed your issue (which it should have done, as we have tried with various different combinations - but want to make sure).