Adar Dembo has posted comments on this change. (
http://gerrit.cloudera.org:8080/12643 )
Change subject: [thirdparty] Bump RapidJSON version to 1.1.0
......................................................................
Patch Set 6:
(2 comments)
The jsonwriter-test.cc failure is the simplest to reproduce. I also managed to
reproduce it in an isolated test case:
$ cat test.cc
#include <iostream>
#include <string>
#include <rapidjson/writer.h>
#include <rapidjson/internal/dtoa.h>
int main(int argc, char* argv[]) {
double v = 11.0;
char buffer[25];
char* end = rapidjson::internal::dtoa(v, buffer);
std::string s(buffer, end - buffer);
std::cout << s << std::endl;
return 0;
}
$ clang++ test.cc -o test
-I/home/adar/Source/kudu/thirdparty/installed/common/include && ./test
11.0
$ clang++ -fsanitize=integer test.cc -o test
-I/home/adar/Source/kudu/thirdparty/installed/common/include && ./test
/home/adar/Source/kudu/thirdparty/installed/common/include/rapidjson/internal/
dtoa.h:88:16: runtime error: unsigned integer overflow: 4294967292 + 4 cannot
be represented in type 'unsigned int'
11.0
Note that I couldn't reproduce this using the top of master in the rapidjson
source repo:
$ clang++ -fsanitize=integer test.cc -o test
-I/home/adar/Source/rapidjson/include && ./test
11.0
So we should bisect the repo and figure out which post-1.1.0 patch fixed this,
then include that patch in our local version of rapidjson 1.1.0.
http://gerrit.cloudera.org:8080/#/c/12643/6/src/kudu/tablet/tablet-test.cc
File src/kudu/tablet/tablet-test.cc:
http://gerrit.cloudera.org:8080/#/c/12643/6/src/kudu/tablet/tablet-test.cc@1114
PS6, Line 1114: this->harness()->Open();
Nit: lift this out of the new scope; it doesn't need to be in there.
http://gerrit.cloudera.org:8080/#/c/12643/5/src/kudu/util/jsonwriter.cc
File src/kudu/util/jsonwriter.cc:
http://gerrit.cloudera.org:8080/#/c/12643/5/src/kudu/util/jsonwriter.cc@30
PS5, Line 30: #include <rapidjson/prettywriter.h>
> IWYU report an error:
Like this:
#include <rapidjson/rapidjson.h> // IWYU pragma: keep
--
To view, visit http://gerrit.cloudera.org:8080/12643
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1c5e6bf6b8c6802bde28716487abb2b242a7a578
Gerrit-Change-Number: 12643
Gerrit-PatchSet: 6
Gerrit-Owner: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Yingchun Lai <[email protected]>
Gerrit-Comment-Date: Wed, 06 Mar 2019 02:13:47 +0000
Gerrit-HasComments: Yes