Skip to content

Commit 7914c48

Browse files
committed
Merge pull request #17646 from ydb-platform/merge-libs-250424-0050
2 parents 5cbafaa + eee83c1 commit 7914c48

File tree

117 files changed

+948
-455
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+948
-455
lines changed

build/conf/java.conf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,6 @@ module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT {
342342
.NODE_TYPE=Bundle
343343
.CMD=$COMPILE_JAVA_MF
344344
.STRUCT_CMD=yes
345-
# TODO(YMAKE-27) all contribs involved into opensource export must be JAVA_CONTRIB modules
346-
# and this module must not be intended for export. Such hange will break JBUILD and thus is
347-
# blocked on YMAKE-27
348-
.SEM=_JAVA_CONTRIB_SEM
349345
.PEERDIR_POLICY=as_build_from
350346
.FINAL_TARGET=no
351347
.ALIASES=SRCS=_SRCS_NO_GLOBAL
@@ -769,6 +765,7 @@ macro _JAVAC_RUN_HELPER(JAVAC_CMD_WITH_ARGS...) {
769765
# tag:java-specific
770766
ERROR_PRONE_JDK16PLUS_ADD_OPENS=-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
771767
ERROR_PRONE_2_7_1_FORCED_OPTS=-Xep:InlineMeInliner:OFF -Xep:SameNameButDifferent:OFF
768+
ERROR_PRONE_2_3_7_FORCED_OPTS=--should-stop=ifError=FLOW
772769

773770
# tag:java-specific
774771
macro _ADD_OPTS_IF_NON_EMPTY(Opt, Args...) {
@@ -1475,6 +1472,8 @@ when (!$USE_SYSTEM_ERROR_PRONE) {
14751472
ERROR_PRONE_VERSION=2.37.0
14761473
ERROR_PRONE_PEERDIR=build/platform/java/error_prone/2.37.0
14771474
ERROR_PRONE_RESOURCE=$ERROR_PRONE_2_37_0_RESOURCE_GLOBAL
1475+
JAVAC_FLAGS_VALUE+=$ERROR_PRONE_2_3_7_FORCED_OPTS
1476+
JAVAC_OPTS+=$ERROR_PRONE_2_3_7_FORCED_OPTS
14781477
}
14791478
otherwise {
14801479
ERROR_PRONE_VERSION=2.7.1

build/mapping.conf.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,18 +1328,23 @@
13281328
"7320257970": "{registry_endpoint}/7320257970",
13291329
"7336062757": "{registry_endpoint}/7336062757",
13301330
"7406874438": "{registry_endpoint}/7406874438",
1331+
"8562787275": "{registry_endpoint}/8562787275",
13311332
"7599484265": "{registry_endpoint}/7599484265",
13321333
"7451602609": "{registry_endpoint}/7451602609",
13331334
"7407124272": "{registry_endpoint}/7407124272",
1335+
"8562985395": "{registry_endpoint}/8562985395",
13341336
"7599517506": "{registry_endpoint}/7599517506",
13351337
"7451585962": "{registry_endpoint}/7451585962",
13361338
"7406983705": "{registry_endpoint}/7406983705",
1339+
"8562765524": "{registry_endpoint}/8562765524",
13371340
"7599285566": "{registry_endpoint}/7599285566",
13381341
"7451712332": "{registry_endpoint}/7451712332",
13391342
"7407028815": "{registry_endpoint}/7407028815",
1343+
"8563229520": "{registry_endpoint}/8563229520",
13401344
"7599469156": "{registry_endpoint}/7599469156",
13411345
"7451466407": "{registry_endpoint}/7451466407",
13421346
"7407150115": "{registry_endpoint}/7407150115",
1347+
"8563465815": "{registry_endpoint}/8563465815",
13431348
"7599422144": "{registry_endpoint}/7599422144",
13441349
"7451406900": "{registry_endpoint}/7451406900",
13451350
"8493428438": "{registry_endpoint}/8493428438",
@@ -2703,18 +2708,23 @@
27032708
"7320257970": "ynd-bin-frozen-python3-mingw-w64-x86_64-e139f4d2038ecfbb34fbbd77f84c4b63ddcb613b",
27042709
"7336062757": "ynd-bin-frozen-python3-mingw-w64-x86_64-eacbfe8057414a218b407c837c9dcd8f2162f810",
27052710
"7406874438": "ynd-clang-18-optimized-darwin-arm64-56872a411472c7ec2b09f2c8372ea4c67d069a5b",
2711+
"8562787275": "ynd-clang-18-optimized-darwin-arm64-b96bb13a4532bc0f19859cd0fd8590f36e4ac9f4",
27062712
"7599484265": "ynd-clang-18-optimized-darwin-arm64-c40775195488adad9218aa6c6dcaf4c20dca0084",
27072713
"7451602609": "ynd-clang-18-optimized-darwin-arm64-c66062833fd14752a7ad8fbfb8f25f370b097278",
27082714
"7407124272": "ynd-clang-18-optimized-darwin-x86_64-56872a411472c7ec2b09f2c8372ea4c67d069a5b",
2715+
"8562985395": "ynd-clang-18-optimized-darwin-x86_64-b96bb13a4532bc0f19859cd0fd8590f36e4ac9f4",
27092716
"7599517506": "ynd-clang-18-optimized-darwin-x86_64-c40775195488adad9218aa6c6dcaf4c20dca0084",
27102717
"7451585962": "ynd-clang-18-optimized-darwin-x86_64-c66062833fd14752a7ad8fbfb8f25f370b097278",
27112718
"7406983705": "ynd-clang-18-optimized-linux-aarch64-56872a411472c7ec2b09f2c8372ea4c67d069a5b",
2719+
"8562765524": "ynd-clang-18-optimized-linux-aarch64-b96bb13a4532bc0f19859cd0fd8590f36e4ac9f4",
27122720
"7599285566": "ynd-clang-18-optimized-linux-aarch64-c40775195488adad9218aa6c6dcaf4c20dca0084",
27132721
"7451712332": "ynd-clang-18-optimized-linux-aarch64-c66062833fd14752a7ad8fbfb8f25f370b097278",
27142722
"7407028815": "ynd-clang-18-optimized-linux-x86_64-56872a411472c7ec2b09f2c8372ea4c67d069a5b",
2723+
"8563229520": "ynd-clang-18-optimized-linux-x86_64-b96bb13a4532bc0f19859cd0fd8590f36e4ac9f4",
27152724
"7599469156": "ynd-clang-18-optimized-linux-x86_64-c40775195488adad9218aa6c6dcaf4c20dca0084",
27162725
"7451466407": "ynd-clang-18-optimized-linux-x86_64-c66062833fd14752a7ad8fbfb8f25f370b097278",
27172726
"7407150115": "ynd-clang-18-optimized-mingw-w64-x86_64-56872a411472c7ec2b09f2c8372ea4c67d069a5b",
2727+
"8563465815": "ynd-clang-18-optimized-mingw-w64-x86_64-b96bb13a4532bc0f19859cd0fd8590f36e4ac9f4",
27182728
"7599422144": "ynd-clang-18-optimized-mingw-w64-x86_64-c40775195488adad9218aa6c6dcaf4c20dca0084",
27192729
"7451406900": "ynd-clang-18-optimized-mingw-w64-x86_64-c66062833fd14752a7ad8fbfb8f25f370b097278",
27202730
"8493428438": "ynd-clang-format-18-darwin-arm64-1743ab83194ed485afca3ceaef1078d95b33f80f",

build/platform/clang/clang18.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"by_platform": {
33
"darwin-arm64": {
4-
"uri": "sbr:7599484265"
4+
"uri": "sbr:8562787275"
55
},
66
"darwin-x86_64": {
7-
"uri": "sbr:7599517506"
7+
"uri": "sbr:8562985395"
88
},
99
"linux-aarch64": {
10-
"uri": "sbr:7599285566"
10+
"uri": "sbr:8562765524"
1111
},
1212
"linux-x86_64": {
13-
"uri": "sbr:7599469156"
13+
"uri": "sbr:8563229520"
1414
},
1515
"win32-x86_64": {
16-
"uri": "sbr:7599422144"
16+
"uri": "sbr:8563465815"
1717
}
1818
}
1919
}

build/sysincl/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
- source_filter: "^(?!(contrib/tools/python|library/python/runtime|library/python/symbols))"
1+
- source_filter: "^(?!((contrib/tools/python3?|library/python/runtime(_py3)?/main|library/python/symbols)/))"
22
includes:
33
- Python-ast.h
44
- Python.h

contrib/libs/backtrace/.yandex_meta/override.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
pkgs: attrs: with pkgs; with attrs; rec {
2-
version = "2025-02-10";
2+
version = "2025-04-08";
33

44
src = fetchFromGitHub {
55
owner = "ianlancetaylor";
66
repo = "libbacktrace";
7-
rev = "0034e33946824057b48c5e686a3aefc761b37384";
8-
hash = "sha256-JCut4afd8a2iXTdbjnyabdWX9JomcSh3qj/RScyVGSw=";
7+
rev = "f1104f3270095831df536a2539f4cc408365105c";
8+
hash = "sha256-+D6oI1EcHh/wMPFBhW5+tjo/8yrqumTv74W90v28BX0=";
99
};
1010

1111
patches = [];

contrib/libs/backtrace/atomic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ backtrace_atomic_store_size_t (size_t *p, size_t v)
103103
void
104104
backtrace_atomic_store_int (int *p, int v)
105105
{
106-
size_t old;
106+
int old;
107107

108108
old = *p;
109109
while (!__sync_bool_compare_and_swap (p, old, v))

contrib/libs/backtrace/ya.make

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ LICENSE(BSD-3-Clause)
66

77
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
88

9-
VERSION(2025-02-10)
9+
VERSION(2025-04-08)
1010

11-
ORIGINAL_SOURCE(https://github.com/ianlancetaylor/libbacktrace/archive/0034e33946824057b48c5e686a3aefc761b37384.tar.gz)
11+
ORIGINAL_SOURCE(https://github.com/ianlancetaylor/libbacktrace/archive/f1104f3270095831df536a2539f4cc408365105c.tar.gz)
1212

1313
ADDINCL(
1414
contrib/libs/backtrace
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from devtools.yamaker import fileutil
2+
from devtools.yamaker.project import CMakeNinjaNixProject
3+
4+
5+
def post_install(self):
6+
fileutil.re_sub_dir(
7+
self.dstdir,
8+
r"\bstd::string\b",
9+
"TProtoStringType",
10+
)
11+
12+
13+
protobuf_mutator = CMakeNinjaNixProject(
14+
nixattr="protobuf_mutator",
15+
arcdir="contrib/libs/protobuf-mutator",
16+
owners=["g:cpp-contrib"],
17+
addincl_global={".": ["."]},
18+
put_with={"protobuf-mutator": ["protobuf-mutator-libfuzzer"]},
19+
post_install=post_install,
20+
)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
self: super: with self; {
2+
protobuf_mutator = stdenv.mkDerivation rec {
3+
pname = "protobuf_mutator";
4+
version = "1.5";
5+
6+
src = fetchFromGitHub {
7+
owner = "google";
8+
repo = "libprotobuf-mutator";
9+
rev = "v${version}";
10+
hash = "sha256-0iohTyYcV76OOaq9zBpQ6FB+ipxlK/fm/4N7Gp8vnwA=";
11+
};
12+
13+
buildInputs = [ pkgs.protobuf ];
14+
15+
nativeBuildInputs = [ cmake ];
16+
17+
cmakeFlags = [
18+
"-DLIB_PROTO_MUTATOR_TESTING=OFF"
19+
];
20+
};
21+
}

contrib/libs/protobuf-mutator/README.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
11
# libprotobuf-mutator
22

3-
[![TravisCI Build Status](https://travis-ci.org/google/libprotobuf-mutator.svg?branch=master)](https://travis-ci.org/google/libprotobuf-mutator)
3+
[![Build Status](https://github.com/google/libprotobuf-mutator/actions/workflows/cmake-multi-platform.yml/badge.svg?event=push)](https://github.com/google/libprotobuf-mutator/actions/workflows/cmake-multi-platform.yml?query=event%3Apush)
44
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/libprotobuf-mutator.svg)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html#libprotobuf-mutator)
55

66
## Overview
77
libprotobuf-mutator is a library to randomly mutate
88
[protobuffers](https://github.com/google/protobuf). <BR>
99
It could be used together with guided fuzzing engines, such as [libFuzzer](http://libfuzzer.info).
1010

11+
The core of libprotobuf-mutator has the following dependencies:
12+
13+
- Protobuf >=3.6.1.3 (library and compiler)
14+
- Clang >=12.0.0 including libFuzzer
15+
1116
## Quick start on Debian/Ubuntu
1217

1318
Install prerequisites:
1419

15-
```
20+
```sh
1621
sudo apt-get update
1722
sudo apt-get install protobuf-compiler libprotobuf-dev binutils cmake \
1823
ninja-build liblzma-dev libz-dev pkg-config autoconf libtool
1924
```
2025

2126
Compile and test everything:
2227

23-
```
28+
```sh
2429
mkdir build
2530
cd build
2631
cmake .. -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug
@@ -36,7 +41,7 @@ build a working version of protobuf.
3641

3742
Installation:
3843

39-
```
44+
```sh
4045
ninja
4146
sudo ninja install
4247
```
@@ -59,7 +64,7 @@ using [libFuzzer](http://libfuzzer.info)'s mutators.
5964

6065
To apply one mutation to a protobuf object do the following:
6166

62-
```
67+
```c++
6368
class MyProtobufMutator : public protobuf_mutator::Mutator {
6469
public:
6570
// Optionally redefine the Mutate* methods to perform more sophisticated mutations.
@@ -77,7 +82,7 @@ See also the `ProtobufMutatorMessagesTest.UsageExample` test from
7782
## Integrating with libFuzzer
7883
LibFuzzerProtobufMutator can help to integrate with libFuzzer. For example
7984
80-
```
85+
```c++
8186
#include "src/libfuzzer/libfuzzer_macro.h"
8287
8388
DEFINE_PROTO_FUZZER(const MyMessageType& input) {
@@ -97,7 +102,7 @@ for fuzzer even if it's capable of inserting acceptable values with time.
97102
PostProcessorRegistration can be used to avoid such issue and guide your fuzzer towards interesting
98103
code. It registers callback which will be called for each message of particular type after each mutation.
99104

100-
```
105+
```c++
101106
static protobuf_mutator::libfuzzer::PostProcessorRegistration<MyMessageType> reg = {
102107
[](MyMessageType* message, unsigned int seed) {
103108
TweakMyMessage(message, seed);
@@ -117,7 +122,7 @@ may corrupt the reproducer so it stops triggering the bug.
117122

118123
Note: You can add callback for any nested message and you can add multiple callbacks for
119124
the same message type.
120-
```
125+
```c++
121126
static PostProcessorRegistration<MyMessageType> reg1 = {
122127
[](MyMessageType* message, unsigned int seed) {
123128
TweakMyMessage(message, seed);
@@ -155,6 +160,24 @@ cleanup/initialize the message as workaround.
155160
* [Envoy](https://github.com/envoyproxy/envoy/search?q=DEFINE_TEXT_PROTO_FUZZER+OR+DEFINE_PROTO_FUZZER+OR+DEFINE_BINARY_PROTO_FUZZER&unscoped_q=DEFINE_TEXT_PROTO_FUZZER+OR+DEFINE_PROTO_FUZZER+OR+DEFINE_BINARY_PROTO_FUZZER&type=Code)
156161
* [LLVM](https://github.com/llvm-mirror/clang/search?q=DEFINE_TEXT_PROTO_FUZZER+OR+DEFINE_PROTO_FUZZER+OR+DEFINE_BINARY_PROTO_FUZZER&unscoped_q=DEFINE_TEXT_PROTO_FUZZER+OR+DEFINE_PROTO_FUZZER+OR+DEFINE_BINARY_PROTO_FUZZER&type=Code)
157162

163+
## Grammars
164+
* GIF, https://github.com/google/oss-fuzz/tree/master/projects/giflib
165+
* JSON
166+
* https://github.com/google/oss-fuzz/tree/master/projects/jsoncpp
167+
* https://github.com/officialcjunior/fuzzrtos/tree/c72e6670e566672ccf8023265cbfad616e75790d/protobufv2
168+
* Lua 5.1 Language,
169+
* https://github.com/ligurio/lua-c-api-tests/tree/master/tests/luaL_loadbuffer_proto
170+
* https://github.com/Spoookyyy/luaj/tree/main/fuzz
171+
* PNG, https://github.com/google/oss-fuzz/tree/master/projects/libpng-proto
172+
* SQL
173+
* https://github.com/tarantool/tarantool/tree/master/test/fuzz/sql_fuzzer
174+
* https://chromium.googlesource.com/chromium/src/third_party/+/refs/heads/main/sqlite/fuzz
175+
* Solidity Language, https://github.com/ethereum/solidity/tree/develop/test/tools/ossfuzz
176+
* XML
177+
* https://github.com/google/oss-fuzz/tree/master/projects/xerces-c
178+
* https://github.com/google/libprotobuf-mutator/tree/master/examples/xml
179+
* JPEG, https://source.chromium.org/chromium/chromium/src/+/main:media/gpu/vaapi/fuzzers/jpeg_decoder/
180+
158181
## Bugs found with help of the library
159182

160183
### Chromium

0 commit comments

Comments
 (0)