Skip to content

Commit c19a6d4

Browse files
author
Arseny Kositsyn
committed
[PGPRO-11599] Fixed CI crashes at hardcore level.
Tags: rum
1 parent f4140aa commit c19a6d4

File tree

6 files changed

+84
-0
lines changed

6 files changed

+84
-0
lines changed

src/tidbitmap/tidbitmap12.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,23 @@ tbm_begin_iterate(TIDBitmap *tbm)
733733
while ((page = pagetable_iterate(tbm->pagetable, &i)) != NULL)
734734
{
735735
if (page->ischunk)
736+
{
737+
/*
738+
* NOTE: This is different from the original tidbitmap.c.
739+
* This check is necessary to avoid warnings from scan-build.
740+
*/
741+
Assert(tbm->schunks);
736742
tbm->schunks[nchunks++] = page;
743+
}
737744
else
745+
{
746+
/*
747+
* NOTE: This is different from the original tidbitmap.c.
748+
* This check is necessary to avoid warnings from scan-build.
749+
*/
750+
Assert(tbm->spages);
738751
tbm->spages[npages++] = page;
752+
}
739753
}
740754
Assert(npages == tbm->npages);
741755
Assert(nchunks == tbm->nchunks);

src/tidbitmap/tidbitmap13.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,23 @@ tbm_begin_iterate(TIDBitmap *tbm)
733733
while ((page = pagetable_iterate(tbm->pagetable, &i)) != NULL)
734734
{
735735
if (page->ischunk)
736+
{
737+
/*
738+
* NOTE: This is different from the original tidbitmap.c.
739+
* This check is necessary to avoid warnings from scan-build.
740+
*/
741+
Assert(tbm->schunks);
736742
tbm->schunks[nchunks++] = page;
743+
}
737744
else
745+
{
746+
/*
747+
* NOTE: This is different from the original tidbitmap.c.
748+
* This check is necessary to avoid warnings from scan-build.
749+
*/
750+
Assert(tbm->spages);
738751
tbm->spages[npages++] = page;
752+
}
739753
}
740754
Assert(npages == tbm->npages);
741755
Assert(nchunks == tbm->nchunks);

src/tidbitmap/tidbitmap14.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,23 @@ tbm_begin_iterate(TIDBitmap *tbm)
733733
while ((page = pagetable_iterate(tbm->pagetable, &i)) != NULL)
734734
{
735735
if (page->ischunk)
736+
{
737+
/*
738+
* NOTE: This is different from the original tidbitmap.c.
739+
* This check is necessary to avoid warnings from scan-build.
740+
*/
741+
Assert(tbm->schunks);
736742
tbm->schunks[nchunks++] = page;
743+
}
737744
else
745+
{
746+
/*
747+
* NOTE: This is different from the original tidbitmap.c.
748+
* This check is necessary to avoid warnings from scan-build.
749+
*/
750+
Assert(tbm->spages);
738751
tbm->spages[npages++] = page;
752+
}
739753
}
740754
Assert(npages == tbm->npages);
741755
Assert(nchunks == tbm->nchunks);

src/tidbitmap/tidbitmap15.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,23 @@ tbm_begin_iterate(TIDBitmap *tbm)
733733
while ((page = pagetable_iterate(tbm->pagetable, &i)) != NULL)
734734
{
735735
if (page->ischunk)
736+
{
737+
/*
738+
* NOTE: This is different from the original tidbitmap.c.
739+
* This check is necessary to avoid warnings from scan-build.
740+
*/
741+
Assert(tbm->schunks);
736742
tbm->schunks[nchunks++] = page;
743+
}
737744
else
745+
{
746+
/*
747+
* NOTE: This is different from the original tidbitmap.c.
748+
* This check is necessary to avoid warnings from scan-build.
749+
*/
750+
Assert(tbm->spages);
738751
tbm->spages[npages++] = page;
752+
}
739753
}
740754
Assert(npages == tbm->npages);
741755
Assert(nchunks == tbm->nchunks);

src/tidbitmap/tidbitmap16.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,23 @@ tbm_begin_iterate(TIDBitmap *tbm)
733733
while ((page = pagetable_iterate(tbm->pagetable, &i)) != NULL)
734734
{
735735
if (page->ischunk)
736+
{
737+
/*
738+
* NOTE: This is different from the original tidbitmap.c.
739+
* This check is necessary to avoid warnings from scan-build.
740+
*/
741+
Assert(tbm->schunks);
736742
tbm->schunks[nchunks++] = page;
743+
}
737744
else
745+
{
746+
/*
747+
* NOTE: This is different from the original tidbitmap.c.
748+
* This check is necessary to avoid warnings from scan-build.
749+
*/
750+
Assert(tbm->spages);
738751
tbm->spages[npages++] = page;
752+
}
739753
}
740754
Assert(npages == tbm->npages);
741755
Assert(nchunks == tbm->nchunks);

src/tidbitmap/tidbitmap17.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,9 +734,23 @@ tbm_begin_iterate(TIDBitmap *tbm)
734734
while ((page = pagetable_iterate(tbm->pagetable, &i)) != NULL)
735735
{
736736
if (page->ischunk)
737+
{
738+
/*
739+
* NOTE: This is different from the original tidbitmap.c.
740+
* This check is necessary to avoid warnings from scan-build.
741+
*/
742+
Assert(tbm->schunks);
737743
tbm->schunks[nchunks++] = page;
744+
}
738745
else
746+
{
747+
/*
748+
* NOTE: This is different from the original tidbitmap.c.
749+
* This check is necessary to avoid warnings from scan-build.
750+
*/
751+
Assert(tbm->spages);
739752
tbm->spages[npages++] = page;
753+
}
740754
}
741755
Assert(npages == tbm->npages);
742756
Assert(nchunks == tbm->nchunks);

0 commit comments

Comments
 (0)