mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
branches/zip: UT_LIST_VALIDATE(): Assert that the link is non-NULL
before dereferencing it. In this way, ut_list_node_313 will be pointing to the last non-NULL list item at the time of the assertion failure. (gcc-4.3.2 -O3 seems to optimize the common subexpressions and make the variable NULL, though.)
This commit is contained in:
parent
ee2b2dc739
commit
0511d15392
1 changed files with 5 additions and 5 deletions
|
@ -220,10 +220,10 @@ do { \
|
|||
\
|
||||
ut_list_node_313 = (BASE).start; \
|
||||
\
|
||||
for (ut_list_i_313 = 0; ut_list_i_313 < (BASE).count; \
|
||||
ut_list_i_313++) { \
|
||||
for (ut_list_i_313 = (BASE).count; ut_list_i_313--; ) { \
|
||||
ut_a(ut_list_node_313); \
|
||||
ASSERTION; \
|
||||
ut_ad((ut_list_node_313->NAME).next || !ut_list_i_313); \
|
||||
ut_list_node_313 = (ut_list_node_313->NAME).next; \
|
||||
} \
|
||||
\
|
||||
|
@ -231,10 +231,10 @@ do { \
|
|||
\
|
||||
ut_list_node_313 = (BASE).end; \
|
||||
\
|
||||
for (ut_list_i_313 = 0; ut_list_i_313 < (BASE).count; \
|
||||
ut_list_i_313++) { \
|
||||
for (ut_list_i_313 = (BASE).count; ut_list_i_313--; ) { \
|
||||
ut_a(ut_list_node_313); \
|
||||
ASSERTION; \
|
||||
ut_ad((ut_list_node_313->NAME).prev || !ut_list_i_313); \
|
||||
ut_list_node_313 = (ut_list_node_313->NAME).prev; \
|
||||
} \
|
||||
\
|
||||
|
|
Loading…
Add table
Reference in a new issue