aboutsummaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* util/saveload: implement default saveload for std::optionalionagamed2023-06-102-0/+43
|
* Require semicolon after saveload macrosesbulatman2023-06-084-4/+14
|
* Refactor and fix constructors TString as std::stringdimdim112023-06-083-22/+115
| | | Fix move constructors when used std::string instead of TString
* Restrict direct usages of google benchmarking librarythegeorg2023-06-081-1/+1
| | | Forbid PEERDIR-ing Google Benchmark from modules other than G_BENCHMARK.
* Remove xray supportthegeorg2023-06-061-22/+0
|
* TMapOps::Value: better return typeignatloskutov2023-06-022-5/+5
| | | | | | | | Выбирается общий тип, а не тип значения в мапе (но не ссылка, потому что auto), что позволяет писать код в духе: ```cpp TMaybe<int> Foo(THashMap<long, int>& map, long key) { return map.Value(key, TMaybe<int>()); } ```
* Optimize CloseAllFdsOnExec for large MaxOpenFilessay2023-05-111-2/+16
|
* Mute -Wdeprecated-declarations error when thread sanitizer enabled on darwin ↵hiddenpath2023-05-091-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platform При сборке проектов с ```--sanitize=thread``` под **darwin**, по умолчанию попадет ```util``` и его часть ```system/context.h```, где в случае ```thread_sanitizer_enabled``` выставляется ```USE_UCONTEXT_CONT```, что приводит к использованию [депрекейтнутного](https://opensource.apple.com/source/libplatform/libplatform-125/include/ucontext.h.auto.html) ```<ucontext.h>``` из [macos_sdk](https://a.yandex-team.ru/arcadia/build/platform/macos_sdk/ya.make?rev=rXXXXXX#L6). Без должных изменений, сборка падает с ошибкой. ```In file included from /Users/hiddenpath/.ya/build/build_root/fnjm/000128/util/all_system_1.cpp:13: In file included from /Users/hiddenpath/arcadia/util/system/context.cpp:31: In file included from /Users/hiddenpath/arcadia/util/system/context.h:46: /Users/hiddenpath/.ya/tools/v4/2088833948/usr/include/ucontext.h:51:2: error: The deprecated ucontext routines require _XOPEN_SOURCE to be defined #error The deprecated ucontext routines require _XOPEN_SOURCE to be defined ^ In file included from /Users/hiddenpath/.ya/build/build_root/fnjm/000128/util/all_system_1.cpp:13: In file included from /Users/hiddenpath/arcadia/util/system/context.cpp:31: /Users/hiddenpath/arcadia/util/system/context.h:68:9: error: use of undeclared identifier 'getcontext' getcontext(&Ctx_); ^ /Users/hiddenpath/arcadia/util/system/context.h:72:9: error: use of undeclared identifier 'getcontext' getcontext(&Ctx_); ^ /Users/hiddenpath/arcadia/util/system/context.h:80:9: error: use of undeclared identifier 'makecontext' makecontext(&Ctx_, (ucontext_func_t)ContextTrampoLine, 1, c.TrampoLine); ^ /Users/hiddenpath/arcadia/util/system/context.h:87:9: error: use of undeclared identifier 'swapcontext' swapcontext(&Ctx_, &next->Ctx_); ^ 5 errors generated. Failed
* Remove using of extra semicolons in utilbulatman2023-05-0410-12/+12
|
* Workaround -Wunused-but-set-variable in Y_DBGTRACE macrothegeorg2023-05-031-36/+24
|
* [util] Fix typo in IThreadPool descrshaprunovk2023-04-271-1/+1
|
* Simplify system utime.h includespreis2023-04-271-2/+1
| | | There is no reason now to hide include behind macro: we have sysincls properly working for years
* Add clarifying comment about the behavior of RemoveRecursive is file or ↵akhropov2023-04-241-0/+1
| | | | directory does not exist.
* External build system generator release 29robot-ya-builder2023-04-193-3/+3
| | | Update tools: yexport
* Intermediate changesrobot-piglet2023-04-111-4/+0
|
* Intermediate changesrobot-piglet2023-03-301-1/+0
|
* Revert ymake build from ydb oss exportalexv-smirnov2023-03-2840-1111/+0
|
* (no commit message)pg2023-03-2814-101/+101
|
* More precise buffer allocation based on base and type, more testsosidorkin2023-03-252-12/+37
|
* Follow up to rXXXXXX: Fix builds on MACs that are not in autоbuildosidorkin2023-03-231-2/+1
| | | | | | https://paste.yandex-team.ru/804bf63f-d433-481e-945b-b555fb15be21 не светилось на CI'ных сборках. Разбираться с автосборкой будут в
* util: Add constexpr int to string conversion class. This will allow us not ↵osidorkin2023-03-233-70/+80
| | | | to have heap allocations when joining ints to string
* External build system generator release 21robot-ya-builder2023-03-173-9/+9
| | | Update tools: yexport
* add library/cpp/actors, ymake build to ydb oss exportalexv-smirnov2023-03-1540-0/+1111
|
* TBaseNumber to std::ostream print support.dcherednik2023-03-152-4/+59
|
* Intermediate changesrobot-piglet2023-03-096-0/+362
|
* Intermediate changesrobot-piglet2023-03-079-6/+6
|
* External build system generator release 17robot-ya-builder2023-03-063-3/+3
| | | Update tools: yexport
* Intermediate changesrobot-piglet2023-02-079-753/+753
|
* Intermediate changesrobot-piglet2023-02-079-753/+753
|
* less shimpg2023-02-061-0/+6
| | | К сожалению, люди успели наплодить переменных и методов c именами i64(), ui64(), поэтому для генеренного кода проще всего оказалось завести несколько type alias arc_ui64 -> ui64, и так далее.
* SetLowestThreadPriority in utilozaykova2023-02-012-0/+16
|
* Fix spinlock pauselukyan2023-02-011-0/+1
|
* External build system generator release 12robot-ya-builder2023-01-313-3/+3
| | | Update tools: yexport
* Fix grammar in "yexception.h"r-andrey2023-01-281-6/+6
|
* TMemoryInput Try to prohibit use-after-free and require explicit cast to ↵ilnurkh2023-01-231-0/+6
| | | | TStringBuf (with &&)
* External build system generator release 8robot-ya-builder2023-01-1712-12/+12
| | | Update tools: yexport
* charset: do not allow surrogate pairs in UTF-8dpotapov2023-01-162-14/+114
| | | | | | | | | | | | | | | | | | | By [RFC3629 section 3](https://datatracker.ietf.org/doc/html/rfc3629#section-3): ``` The definition of UTF-8 prohibits encoding character numbers between U+D800 and U+DFFF, which are reserved for use with the UTF-16 encoding form (as surrogate pairs) and do not directly represent characters. ``` Current implementation of `ReadUTF8CharAndAdvance` allows `UTF-8` encoded surrogate characters like 0xED 0xA0 0xBD or 0xED 0xB3 0x9A leaving them in the strings that cannot be processed afterwards by external programs like `iconv`. This patch provides `strict` template flag that disables this leniency. This flag is not enabled by default, because Arcadia already has hundreds of tests with inputs containing such surrogate pairs and these tests breaks in strict mode and there is a chance that prod might affected too. SSE4 implementation doesn't perform any validation at all, so it is left unchanged.
* TSharedPtr::As()&: leakage fixsv-denisov2023-01-142-6/+59
| | | | | | По следам https://a.yandex-team.ru/review/2996409/details Исправлены случаи при неудачных кастах: 1. контрольный блок дёргается даже при указании на nullptr (нехорошо для атомиков) 2. если исходный шаред поинтер разрушится раньше, чем полученный nullptr (например, при возврате из функции), то ресурс утечёт
* introduce NumberOfMillicores() function based on refactored CgroupCpus() ↵svkrasnov2023-01-122-5/+29
| | | | returning double value
* add windows platform to ydb github exportalexv-smirnov2022-12-207-0/+1194
|
* Sync linux-headers instead of using system onesthegeorg2022-12-158-14/+79
|
* remove kikimr/driver DEPENDSqrort2022-12-021-126/+0
|
* validate canons without yatest_commonqrort2022-11-301-0/+126
|
* more information in TEpollPoller::SetImpl error messageskulikov2022-11-142-2/+17
| | | | - don't hide epoll_ctl add errors; - print "fd" and "what" args.
* [util] Terminate instead of deadlock after fork with running thread poolssskvor2022-11-101-4/+8
| | | | | Контекст. В древнем странном коде обнаружили, что если создавать `TThreadPool` часто и конкуретно с запуском `TShellCommand`, то иногда последняя дедлочится: если начали выполнять конструктор `TThreadPool` и регистрацию в `TAtforkQueueRestarter`, захватив `TAtforkQueueRestarter::ActionMutex`, а в другом потоке параллельно сделали `fork`, то последний может форкнуться с залоченым мьютексом. Первым делом происходит вызов коллбеков из `pthread_atfork`, где мьютекс лочится заново. Конечно, форкаться в сложных программах с тредпулами категорически запрещено, но, подозреваю, много кода в аркадии так написано. Давайте как-то защитимся от такого.
* Add comment about necessary nanny settingsskorodumov-s2022-11-021-0/+5
|
* Correct debug trap for M1somov2022-10-301-0/+4
|
* Remove a workaround for ancient CUDA versionsdfyz2022-10-291-7/+0
| | | `#define noexcept throw()` is a questionable idea, since replacing `noexcept` with `throw()` in expressions such as `noexcept(true)` results in spectacular compiler errors. We stopped supporting CUDA 8 (and even CUDA 9) long ago, which means we can just get rid of the problematic define.
* fix coveriy issue 16907: Uninitialized pointer fielduzhas2022-10-281-0/+1
|
* Enable linux-arm platform.dcherednik2022-10-267-22/+458
|