<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ydb/contrib/libs, branch main</title>
<subtitle>Mirror of YDB github repos</subtitle>
<id>https://code.mastervirt.ru/ydb/atom?h=main</id>
<link rel='self' href='https://code.mastervirt.ru/ydb/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/'/>
<updated>2026-07-20T20:48:39Z</updated>
<entry>
<title>backport zstd fix of UB</title>
<updated>2026-07-20T20:48:39Z</updated>
<author>
<name>makxenov</name>
<email>makxenov@yandex-team.com</email>
</author>
<published>2026-07-20T20:02:03Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=e41bc8350350c24080f8f88bff0d2429bd76a213'/>
<id>urn:sha1:e41bc8350350c24080f8f88bff0d2429bd76a213</id>
<content type='text'>
contrib/libs/zstd06: backport facebook/zstd@e50ed1fa3ac5857b6be914ec818a71c914789d4f — Fix undefined behavior when srcSize==1
contrib/libs/zstd06: backport facebook/zstd@cf409a7e2a4182530496f1b690a6c0a898b6d8dc — floor srcLog at ZSTD_HASHLOG_MIN in ZSTD_adjustCParams
commit_hash:33a74ae6c8c82727d3e4ffe1d869d27a943ae963
</content>
</entry>
<entry>
<title>libbacktrace abbrev cache</title>
<updated>2026-07-20T18:40:42Z</updated>
<author>
<name>denkitaev</name>
<email>denkitaev@yandex-team.com</email>
</author>
<published>2026-07-20T17:50:15Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=92668a25e40f1ae9c5b4dcd40d5d68aec54e75b8'/>
<id>urn:sha1:92668a25e40f1ae9c5b4dcd40d5d68aec54e75b8</id>
<content type='text'>
### Проблема

libbacktrace парсит DWARF abbrev-таблицу заново для каждого CU — кэша по offset в build_address_map нет. Инструменты, дедуплицирующие .debug_abbrev между CU (llvm-bolt --update-debug-sections, dwz, -flto=full), сводят все таблицы к одной общей, на которую ссылаются все CU разом - и стоимость инициализации символизатора становится O(N_CU × размер общей таблицы). На BOLT-бинаре yabs-server (\~70k CU) первый же резолв бэктрейса разворачивает в память 70 тысяч копий одной и той же таблицы: 15.7 ГиБ анонимной памяти, в проде - OOM-цикл сервиса при включённой DWARF-символизации. Дедупликация таблиц есть и без BOLT (линкер мёржит одинаковые), поэтому эффект, в меньшем масштабе, заметен везде.

### Воспроизведение

&lt;https://nda.ya.ru/t/L_uavEhP7jBnqo&gt;

```bash
cd junk/denkitaev/libbacktrace_debug/repro
ya make -r &amp;&amp; ./repro  # .debug_abbrev не дедуплицированна
ya make -r -DUSE_LTO=yes &amp;&amp; ./repro  # .debug_abbrev дедуплицированна
```

### Фикс

Кэш распарсенных таблиц по abbrev_offset внутри build_address_map: таблица парсится один раз, CU получают shallow-копии. Кэш локален для одного вызова (одна .debug_abbrev-секция; потокобезопасность не меняется), владеет таблицами; fail-путь освобождает их ровно один раз — прежний per-unit free_abbrevs при шаринге дал бы double-free. Горячий путь резолва не тронут.

#|
||

**&lt;a href="https://nda.ya.ru/t/s7nuA8_37jBnqq" target="_blank"&gt;![](https://nda.ya.ru/t/mAiQIjHx7Mm3JC =30x) Echo tests&lt;/a&gt;**

||
|#
commit_hash:d101e82766f99efbc214a894c1e0971822ba0485
</content>
</entry>
<entry>
<title>Intermediate changes</title>
<updated>2026-07-20T16:08:52Z</updated>
<author>
<name>robot-piglet</name>
<email>robot-piglet@yandex-team.com</email>
</author>
<published>2026-07-20T15:28:46Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=3c2230d56c7421846d1d6fe496d9b3deea873869'/>
<id>urn:sha1:3c2230d56c7421846d1d6fe496d9b3deea873869</id>
<content type='text'>
commit_hash:2d3c54c918706f97b85d6afcd116dc95aaf7dae6
</content>
</entry>
<entry>
<title>Intermediate changes</title>
<updated>2026-07-20T14:06:30Z</updated>
<author>
<name>robot-piglet</name>
<email>robot-piglet@yandex-team.com</email>
</author>
<published>2026-07-20T13:13:38Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=bf69c7b7a5ef3e46cad80fa3cb02c3b4bb003903'/>
<id>urn:sha1:bf69c7b7a5ef3e46cad80fa3cb02c3b4bb003903</id>
<content type='text'>
commit_hash:78b02e1e92874488f64c4d1dc2f5d9930b87c279
</content>
</entry>
<entry>
<title>Update contrib/libs/expat to 2.8.2</title>
<updated>2026-07-20T07:55:35Z</updated>
<author>
<name>robot-contrib</name>
<email>robot-contrib@yandex-team.com</email>
</author>
<published>2026-07-20T07:34:32Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=f7be20305549bd27325c10f292d252cc574c1cef'/>
<id>urn:sha1:f7be20305549bd27325c10f292d252cc574c1cef</id>
<content type='text'>
commit_hash:16adc3694a02a636ae594b94a8747bad66a2ae62
</content>
</entry>
<entry>
<title>Update contrib/libs/apache/orc to 2.3.1</title>
<updated>2026-07-18T21:00:39Z</updated>
<author>
<name>robot-contrib</name>
<email>robot-contrib@yandex-team.com</email>
</author>
<published>2026-07-18T20:12:20Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=c876e5a0f7f6bdded0ab9252700f044ab893c542'/>
<id>urn:sha1:c876e5a0f7f6bdded0ab9252700f044ab893c542</id>
<content type='text'>
commit_hash:c8e08b15e4a3b315772f3e7816ee13eb8cf9604e
</content>
</entry>
<entry>
<title>Intermediate changes</title>
<updated>2026-07-17T19:16:21Z</updated>
<author>
<name>robot-piglet</name>
<email>robot-piglet@yandex-team.com</email>
</author>
<published>2026-07-17T15:19:17Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=a4c142fc3ab135d55de1347a23605bf739068d40'/>
<id>urn:sha1:a4c142fc3ab135d55de1347a23605bf739068d40</id>
<content type='text'>
commit_hash:620bab14628472356beb29079f160b53495d5044
</content>
</entry>
<entry>
<title>Intermediate changes</title>
<updated>2026-07-17T16:16:42Z</updated>
<author>
<name>robot-piglet</name>
<email>robot-piglet@yandex-team.com</email>
</author>
<published>2026-07-17T13:29:59Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=b1cc4143fea8621e13dedcb57a09ae920f917a94'/>
<id>urn:sha1:b1cc4143fea8621e13dedcb57a09ae920f917a94</id>
<content type='text'>
commit_hash:a80bf33d3a13bab295324f0e5cbdcfa09c3807b1
</content>
</entry>
<entry>
<title>Update contrib/libs/libevent to 2.1.13</title>
<updated>2026-07-17T16:15:28Z</updated>
<author>
<name>robot-contrib</name>
<email>robot-contrib@yandex-team.com</email>
</author>
<published>2026-07-17T13:03:13Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=734254ede64e826152153d2f870405ee58b2c5ff'/>
<id>urn:sha1:734254ede64e826152153d2f870405ee58b2c5ff</id>
<content type='text'>
commit_hash:5d4096712a76f98714c8b9f819d311a9b6785d08
</content>
</entry>
<entry>
<title>Intermediate changes</title>
<updated>2026-07-15T15:58:36Z</updated>
<author>
<name>robot-piglet</name>
<email>robot-piglet@yandex-team.com</email>
</author>
<published>2026-07-15T15:33:15Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/ydb/commit/?id=406b4d6be09294a66bd9d2f8fd566d659a6ae775'/>
<id>urn:sha1:406b4d6be09294a66bd9d2f8fd566d659a6ae775</id>
<content type='text'>
commit_hash:03155c42013daab093f1a1057b02c44fa9c7d361
</content>
</entry>
</feed>
