On 3/28/23 09:27, Amos Jeffries wrote:
Alex, since the whole IPC and SHM system is your design are you able to work on fixing the FlexibleArray build errors we are now getting with clang v15.

Sure, I will work on this. I doubt I will be able to post a fix in the next few days due to travel, but I am sure we can figure it out in a week or so.

Alex.


[1] Log excerpt from Jenkins:

01:00:06 In file included from ../../../../src/ipc/StoreMap.h:12,
01:00:06                  from ../../../../src/fs/rock/RockRebuild.h:17,
01:00:06                  from ../../../../src/fs/rock/RockRebuild.cc:15:
01:00:06 In member function 'Item& Ipc::Mem::FlexibleArray<Item>::operator[](int) [with Item = long unsigned int]', 01:00:06     inlined from 'Ipc::StoreMapItems<C>::Item& Ipc::StoreMapItems<C>::at(int) [with C = long unsigned int]' at ../../../../src/ipc/StoreMap.h:136:21, 01:00:06     inlined from 'Rock::LoadingEntry::LoadingEntry(sfileno, Rock::LoadingParts&)' at ../../../../src/fs/rock/RockRebuild.cc:199:27: 01:00:06 ../../../../src/ipc/mem/FlexibleArray.h:34:52: error: array subscript -1 is below array bounds of 'long unsigned int [1]' [-Werror=array-bounds=] 01:00:06    34 |     Item &operator [](const int idx) { return items[idx]; }
01:00:06       | ~~~~~^
01:00:06 ../../../../src/ipc/mem/FlexibleArray.h: In constructor 'Rock::LoadingEntry::LoadingEntry(sfileno, Rock::LoadingParts&)': 01:00:06 ../../../../src/ipc/mem/FlexibleArray.h:43:10: note: while referencing 'Ipc::Mem::FlexibleArray<long unsigned int>::items' 01:00:06    43 |     Item items[1]; // ensures proper alignment of array elements
01:00:06       |          ^~~~~
01:00:06 In member function 'Item& Ipc::Mem::FlexibleArray<Item>::operator[](int) [with Item = unsigned int]', 01:00:06     inlined from 'Ipc::StoreMapItems<C>::Item& Ipc::StoreMapItems<C>::at(int) [with C = unsigned int]' at ../../../../src/ipc/StoreMap.h:136:21, 01:00:06     inlined from 'Rock::LoadingEntry::LoadingEntry(sfileno, Rock::LoadingParts&)' at ../../../../src/fs/rock/RockRebuild.cc:200:33: 01:00:06 ../../../../src/ipc/mem/FlexibleArray.h:34:52: error: array subscript -1 is below array bounds of 'unsigned int [1]' [-Werror=array-bounds=] 01:00:06    34 |     Item &operator [](const int idx) { return items[idx]; }
01:00:06       | ~~~~~^
01:00:06 ../../../../src/ipc/mem/FlexibleArray.h: In constructor 'Rock::LoadingEntry::LoadingEntry(sfileno, Rock::LoadingParts&)': 01:00:06 ../../../../src/ipc/mem/FlexibleArray.h:43:10: note: while referencing 'Ipc::Mem::FlexibleArray<unsigned int>::items' 01:00:06    43 |     Item items[1]; // ensures proper alignment of array elements
01:00:06       |          ^~~~~
01:00:06 In member function 'Item& Ipc::Mem::FlexibleArray<Item>::operator[](int) [with Item = int]', 01:00:06     inlined from 'Ipc::StoreMapItems<C>::Item& Ipc::StoreMapItems<C>::at(int) [with C = int]' at ../../../../src/ipc/StoreMap.h:136:21, 01:00:06     inlined from 'Rock::LoadingSlot::LoadingSlot(Rock::SlotId, Rock::LoadingParts&)' at ../../../../src/fs/rock/RockRebuild.cc:208:27: 01:00:06 ../../../../src/ipc/mem/FlexibleArray.h:34:52: error: array subscript -1 is below array bounds of 'int [1]' [-Werror=array-bounds=] 01:00:06    34 |     Item &operator [](const int idx) { return items[idx]; }
01:00:06       | ~~~~~^
01:00:06 ../../../../src/ipc/mem/FlexibleArray.h: In constructor 'Rock::LoadingSlot::LoadingSlot(Rock::SlotId, Rock::LoadingParts&)': 01:00:06 ../../../../src/ipc/mem/FlexibleArray.h:43:10: note: while referencing 'Ipc::Mem::FlexibleArray<int>::items' 01:00:06    43 |     Item items[1]; // ensures proper alignment of array elements
01:00:06       |          ^~~~~
01:00:06 cc1plus: all warnings being treated as errors
01:00:06 make[4]: *** [Makefile:986: rock/RockRebuild.lo] Error 1
01:00:06 make[4]: Leaving directory '/srv/jenkins/workspace/5-pr-test/COMPILER/gcc/OS/fedora-rawhide/label/docker-build-host/btlayer-02-maximus/squid-7.0.0-VCS/_build/sub/src/fs'
_______________________________________________
squid-dev mailing list
squid-dev@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-dev

Reply via email to