summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* Fix backtrace print in assertmag1str06 days1-2/+10
| | | | commit_hash:1bc8f82703745c9c7e06f2239735548ccd65997c
* Annotate 'ysize' as deprecated.akhropov6 days5-0/+5
| | | | commit_hash:2f5a44083a78a69d4d717b90d401af6f017e990d
* Use CameCase for static constantsmikhnenko11 days1-2/+2
| | | | commit_hash:fc23ef3f9e711cdb0253f459d0a3ecc82c0a882c
* Add a description explaining the rationale for the SIZEOF_ definitionsakhropov12 days1-0/+3
| | | | commit_hash:cd223dae0a4b3919808abb2d312f7e9936665424
* Use 'size' instead of 'ysize'.akhropov14 days3-3/+3
| | | | commit_hash:2992608384ed9b84c3f523bd2225a7ece2eeb9fc
* Correct grammarakhropov2025-10-061-2/+2
| | | | commit_hash:44304dc1e157320ff3e9c4026dabc8609c04ef04
* 16-bit platforms are not supported anymore.akhropov2025-10-061-1/+1
| | | | commit_hash:b336c8247b40aa5c43fcf82c154a7d4fdd08e9a5
* Correct "@throws" descriptionsakhropov2025-10-051-17/+18
| | | | commit_hash:5421bf011ff73356a4adf0b73eeff9ab7e6cb6db
* Fix return value description of GetEnvakhropov2025-10-051-1/+1
| | | | commit_hash:afbe8d7cf5642658803f7377b92c59b332ac2a46
* Mention all functionsakhropov2025-10-051-4/+4
| | | | commit_hash:87dfa7bd1279801c976ae3d9dc025eb0a4492ddf
* Fix in docs: UNUSED -> Y_UNUSEDakhropov2025-10-051-1/+1
| | | | commit_hash:82a20efd47b7df97b99e63d7fd9d79e7e93a7817
* TDuration/TInstant named constructors should return staturated value on overflowswarmer2025-10-032-43/+143
| | | | | | `TDuration::Seconds(sec)` now returns `TDuration::Max()` if `sec` is greater than the largest representable value. Previously, a silent wrap-around could produce a significantly shorter interval (even a zero one). commit_hash:552fde08fa3b8201ede23894bb363df2d6bbd5af
* Intermediate changesrobot-piglet2025-10-031-1/+5
| | | | commit_hash:86194fc61838b6eca04dee924d646ca679907fbc
* Intermediate changesrobot-piglet2025-10-031-1/+1
| | | | commit_hash:bae4c0693bea21daa09eb9fb12478a5611ae5ffc
* Dont scan stacknechda2025-10-021-18/+0
| | | | | Remove stack scaning commit_hash:bf23dab42b2595d34beaba1f571e38763a222300
* Visit -> std::visit in documentation as well.akhropov2025-10-021-3/+3
| | | | commit_hash:cabbe1fff9c8d37ce2ee165b5f9aeb0cd27ba383
* Consistency: Make TFakeMutex move-only, explicitly declare TMutex as move-onlyakhropov2025-10-011-4/+2
| | | | commit_hash:11d3f50cee3ad3dd179d52280ddcb8ea225719ec
* Fix naming reported by clang-tidymikhnenko2025-10-012-9/+9
| | | | commit_hash:4c9065f19b98cd54fb2a25a3aec88f682420ba9b
* Scan stack for args in darwin dbgnechda2025-09-261-27/+18
| | | | | Use va_args for extract stack-args commit_hash:db85572af5ed95ebea715b918986d2932e044733
* Intermediate changesrobot-piglet2025-09-251-2/+0
| | | | commit_hash:756a85825380f76f173d751aad3f91c4442046e9
* feat util: fix ThreadSanitizer reported data raceantoshkka2025-09-251-8/+13
| | | | | | | | | | | | | ``` WARNING: ThreadSanitizer: data race (pid=123179) Read of size 8 at 0x0000065aad98 by thread T14: #0 NSystemInfo::CachedNumberOfCpus() util/system/info.cpp:241:10 (taxi-uservices-userver-core-tests+0x4155bba) #1 engine::(anonymous namespace)::TaskProcessorThreadStartedHook() userver/core/src/engine/task/task_processor.cpp:100:15 (taxi-uservices-userver-core-tests+0x5306bc8) #2 engine::TaskProcessor::PrepareWorkerThread(unsigned long) userver/core/src/engine/task/task_processor.cpp:347:5 (taxi-uservices-userver-core-tests+0x5306bc8) ``` The change on a hot path is equivalent to the previously compiler generated x86 code (just a `load` instruction). On other platforms this could actually fix a data race. commit_hash:acb1fe1b8f3075cc27b18aab4f1bd0b88292c270
* Looking for the return address more persistentlynechda2025-09-241-3/+28
| | | | commit_hash:dafe73fcca759e0bf13ca38bdd4e320c8d85c7b6
* Use 'size_t' instead of 'yint' that is not known in utilakhropov2025-09-211-1/+1
| | | | commit_hash:c2fb7faa6674ce1b0d6a2d3cd2f0ef45a461ea0d
* Remove a useless commentakhropov2025-09-211-2/+0
| | | | commit_hash:678d75c67121dce4b0007e25b24c4e6ef173f8a8
* Fix `-Wignored-qualifiers` improved in clang20 in utilmikhnenko2025-09-131-1/+1
| | | | | Fix errors from [here](https://nda.ya.ru/t/6hgrAk757JpcZP commit_hash:46e426f3170c5b9881f552314f602e57662334a6
* no COW mode for TStringpg2025-09-091-0/+20
| | | | commit_hash:cac5390ad9d9bc5822ca2f6ebd362a55d4190759
* fix bug in GetMemInfo on freebsdtldr2025-08-291-0/+4
| | | | commit_hash:47d410520be641eaa93ab44b92da8a095e72d301
* Add forward-declaration of TBlob to util/generic/fwd.hthegeorg2025-08-221-0/+2
| | | | | While the class itself it defined in `util/memory/blob.h`, it seems better to reuse an existing `fwd.h` rather than creating a new one. commit_hash:3e373ab68ced34c709ee12e3ce5b544376ac8417
* Don't use deprecated literal operatornamorniradnug2025-08-201-13/+13
| | | | | | Newer clang versions produce the `deprecated-literal-operator` warning. See https://reviews.llvm.org/D152632 and https://wg21.link/CWG2521. commit_hash:52ebdc26dfe511681a1d73f24a8ba96592bb1b47
* TTempFile should be move-only. Implement proper move semantics.akhropov2025-08-152-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | #### Реализация move-семантики для TTempFile и оптимизация передачи параметров 📝 - 🔄 **Сделал TTempFile move-only классом**: - Удалили копирующий конструктор и оператор присванивания - Добавили перемещающий конструктор и оператор с noexcept - Изменили хранение имени файла в TMaybe для безопасного перемещения - Добавили явное удаление временного файла в операторе перемещения - 🏗 **Оптимизировали передачу параметров в различных классах**: - Заменили передачу объектов по значению/константной ссылке на перемещение (std::move) - Основные изменения коснулись параметров среды (envParams) и аргументов процессов - ✨ **Улучшили обработку временных файлов**: - Убрали лишнее поле TTempFile из TSmallEnvParams - Вектор временных файлов теперь корректно хранится и обрабатывается через move-семантику - 📝 **Прочие улучшения**: - Исправлены контексты вызовов, где используется временная файловая система - Оптимизированы аргументы запуска процессов через std::move - Добавлено перемещение для аргументов стандартных потоков ввода-вывода --- **Оценить качество описания можно [здесь](https://nda.ya.ru/t/_MxIaV0Q7FnCMG** <a href="https://nda.ya.ru/t/qa0kX64r7DqvtN"><font size="2">Autodescription by Code Assistant</font></a> commit_hash:474bcbb9db8c7dc14d7aa204991ecdb4611e8e87
* Intermediate changesrobot-piglet2025-08-151-1/+1
| | | | commit_hash:c453d8ab5fbf0440dec8356e0f741bfe25d48033
* TIntrusivePtr is not needed hereakhropov2025-08-112-3/+2
| | | | commit_hash:54b9e74039cd4f86cc8ab610b27005a5199af4f9
* Fix grammar, better wording and fix the version of the standardakhropov2025-08-111-2/+2
| | | | commit_hash:af06eeb383729e2b7ce1254d0a24f68b126591fe
* Fix typomikailbag2025-08-061-1/+1
| | | | | This fixes a typo caught by GameRoMan in https://github.com/yandex/perforator/pull/51 commit_hash:0fba8e46bed70f3afbd3f4a5a473be24c67e8f2f
* Y_HAS_CPP_ATTRIBUTE macroswarmer2025-08-051-43/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new macro `Y_HAS_CPP_ATTRIBUTE` simplifies the check for C++ attribute support by handling nested `#if defined(__has_cpp_attribute)` checks. Before: ```cpp #if defined(__has_cpp_attribute) #if __has_cpp_attribute(attribute_name) // use #else // fallback #endif #else // fallback #endif ``` After: ```cpp #if Y_HAS_CPP_ATTRIBUTE(attribute_name) // use #else // fallback #endif ``` The new macro also allows checking C++ attributes when compiling C code without raising errors related to different tokenization rules in these languages. Of course, such a test always returns `0` when compiling source code in C. Also, rename `Y_HAVE_ATTRIBUTE` to `Y_HAS_ATTRIBUTE` for consistency. commit_hash:9c12fe5d0e6a570d7f11910704c0a9b05d100434
* Add Y_LIFETIME_CAPTURE_BY macromikhnenko2025-08-041-0/+18
| | | | commit_hash:3151ac4c7e3a3f787cd3936b642f516242f6d47c
* removed bad hardcoded constantsalmpac2025-08-041-1/+1
| | | | | changed bad code commit_hash:8053651f4c77622c3e55a5d169d7798e6a2c912d
* [util] TTempDir: add a move constructor to prevent the same path from being ↵swarmer2025-08-024-0/+28
| | | | | | | deleted twice KIKIMR-23792 commit_hash:08d23be6f557b28355c02b4dd98adf02db24b64b
* [util] fix the crash if the working directory was deleted before the ↵swarmer2025-08-022-1/+20
| | | | | | | initialization of the random engine KIKIMR-23792 commit_hash:2163a621a44ee5d142cb9d88719def28a393b354
* Make TShellCommand move-onlyakhropov2025-07-311-1/+1
| | | | commit_hash:5dc8e46003b70c95c2aaf80e8772e2de6f5d7e54
* compile util/system/defaults.c with a C compilerswarmer2025-07-314-1/+4
| | | | commit_hash:490ce843e0fa3ad97bc6865d6b8fb8a79678d469
* Revert commit rXXXXXX, Y_HAS_CPP_ATTRIBUTE macroswarmer2025-07-241-40/+29
| | | | | This implementation breaks GCC when compiling plain C code: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114007 commit_hash:963bf8890ce591a67c84996a2bd3411442cba58e
* Y_HAS_CPP_ATTRIBUTE macroswarmer2025-07-241-29/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new macro `Y_HAS_CPP_ATTRIBUTE` simplifies the check for C++ attribute support by handling nested `#if defined(__has_cpp_attribute)` checks. Before: ```cpp #if defined(__has_cpp_attribute) #if __has_cpp_attribute(attribute_name) // use #else // fallback #endif #else // fallback #endif ``` After: ```cpp #if Y_HAS_CPP_ATTRIBUTE(attribute_name) // use #else // fallback #endif ``` Also, rename `Y_HAVE_ATTRIBUTE` to `Y_HAS_ATTRIBUTE` for consistency. commit_hash:7994e363e1c7632e0451891862d406d19ca24863
* port util to freebsd, againpg2025-07-104-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` [pg@arc ~]$ ./util-ut <----- TSaveLoadTest [exec] TSaveLoadTest::TestSaveLoad... [good] TSaveLoadTest::TestSaveLoad [exec] TSaveLoadTest::TestSaveLoadEmptyStruct... [good] TSaveLoadTest::TestSaveLoadEmptyStruct [exec] TSaveLoadTest::TestNewStyle... [good] TSaveLoadTest::TestNewStyle [exec] TSaveLoadTest::TestNewNewStyle... [good] TSaveLoadTest::TestNewNewStyle [exec] TSaveLoadTest::TestList... [good] TSaveLoadTest::TestList [exec] TSaveLoadTest::TestTuple... [good] TSaveLoadTest::TestTuple [exec] TSaveLoadTest::TestVariant... [good] TSaveLoadTest::TestVariant [exec] TSaveLoadTest::TestOptional... [good] TSaveLoadTest::TestOptional [exec] TSaveLoadTest::TestInheritNonVirtualClass... [good] TSaveLoadTest::TestInheritNonVirtualClass [exec] TSaveLoadTest::TestInheritVirtualClass... [good] TSaveLoadTest::TestInheritVirtualClass -----> TSaveLoadTest -> ok: 10 [DONE] ok: 10 [pg@arc ~]$ uname -a FreeBSD arc.freebsd.devtools 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64 [pg@arc ~]$ ``` commit_hash:229d8aa6c8ccce1376d152a833fe8bf7c5faa3bd
* Fix Y_NO_UNIQUE_ADDRESSludaludaed2025-07-091-2/+0
| | | | | Fix commit_hash:3ceec269bc1e9f318949493b79d1536db72d8a11
* Add Y_NO_UNIQUE_ADDRESSludaludaed2025-07-091-0/+30
| | | | | Add Y_NO_UNIQUE_ADDRESS commit_hash:ef4b0719294a6019a0b5802769cb2a15c2dd1b64
* Intermediate changesrobot-piglet2025-06-231-7/+13
| | | | commit_hash:2cae4f8b8ad560eb417e09ac5ff75d2c9df3cb59
* Add TUniqueTypeList and NTL::TUniqueyurial2025-06-222-0/+41
| | | | | Позволяет получить TTypeList с уникальными типами. commit_hash:589914da95d44bdc457d7e4341e4a377df2da2b8
* Upver wine 10.8nechda2025-06-191-0/+4
| | | | commit_hash:db0a0308d356c8dca2520f3881de2615edcc4455
* Check that bytes consist of 8 bitsakhropov2025-06-171-0/+4
| | | | commit_hash:9eaf085276f1f93768b8b0e5ec92a53bf0db86a8