1. add LRUResourceCache for managing resource cache in lru policy
2. rollback LRUCache to the original version
3. add remove() in LRUCache
4. add unit tests for LRUResourceCache and LRUCache
- fix variables inside prepare.sh
- fix variables for invoking prepare.sh
- fix path to queries file
- wait for eof on client (exiting client is required to catch all
possible issues, that can be reported by i.e. ASan on exit)
- fix spawning of clean.sh by replace with system
Cc: @kssenii
In case of shared builds the symbol can be represented in multiple
shared objects, and so if one SO contains _end symbol firstly, then it
it's address can subtracted from the symbol from another SO, and this
give overflow.
Here is an example of such symbol:
$ llvm-readelf -a programs/server/libclickhouse-server-libd.so | fgrep schemata_sql
552: 000000000010b869 0 NOTYPE GLOBAL DEFAULT 22 _binary_schemata_sql_size
1271: 000000000010b869 0 NOTYPE GLOBAL DEFAULT 22 _binary_schemata_sql_end
3627: 000000000010b480 0 NOTYPE GLOBAL DEFAULT 22 _binary_schemata_sql_start
5822: 000000000010b869 0 NOTYPE GLOBAL DEFAULT 22 _binary_schemata_sql_end
5828: 000000000010b869 0 NOTYPE GLOBAL DEFAULT 22 _binary_schemata_sql_size
5831: 000000000010b480 0 NOTYPE GLOBAL DEFAULT 22 _binary_schemata_sql_start
$ llvm-readelf -W -a src/TableFunctions/libclickhouse_table_functionsd.* | fgrep schemata_sql
1709: 00000000001fc5a1 0 NOTYPE GLOBAL DEFAULT 22 _binary_schemata_sql_end
5107: 00000000001fc5a1 0 NOTYPE GLOBAL DEFAULT 22 _binary_schemata_sql_size
6090: 00000000001fc1b8 0 NOTYPE GLOBAL DEFAULT 22 _binary_schemata_sql_start
10975: 00000000001fc1b8 0 NOTYPE GLOBAL DEFAULT 22 _binary_schemata_sql_start
10976: 00000000001fc5a1 0 NOTYPE GLOBAL DEFAULT 22 _binary_schemata_sql_end
10977: 00000000001fc5a1 0 NOTYPE GLOBAL DEFAULT 22 _binary_schemata_sql_size
To address this, add base address of the Elf into the resources to
compare with.
Follow-up for: #33134 (cc @alexey-milovidov)