You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Mike Percy (Code Review)" <ge...@cloudera.org> on 2019/03/02 02:49:25 UTC

[kudu-CR] rapidjson-test: Fail test instead of crash on RapidJSON UB issue

Mike Percy has uploaded this change for review. ( http://gerrit.cloudera.org:8080/12648


Change subject: rapidjson-test: Fail test instead of crash on RapidJSON UB issue
......................................................................

rapidjson-test: Fail test instead of crash on RapidJSON UB issue

This patch updates rapidjson-test to fail instead of crash in RELEASE
mode on newer versions of G++ such as 7.3.0 on Ubuntu bionic when run
against a version of RapidJSON < 1.1.0 with known undefined behavior in
the implementation. When run against RapidJSON 1.1.0, this test passes,
even when run with UBSAN enabled. So this patch removes the code to skip
the test in ASAN build mode.

Only the SignedAndUnsignedInts tests was updated to fail instead of
crash when the UB was observed, because all the other tests pass even on
older versions of RapidJSON.

Note: on older versions of RapidJSON with GCC 7.3.0 in RELEASE mode,
instead of crashing this test now fails with the following error
messages:

[ RUN      ] JsonReaderTest.SignedAndUnsignedInts
../../src/kudu/util/jsonreader-test.cc:237: Failure
Value of: s.IsInvalidArgument()
  Actual: false
Expected: true
OK
../../src/kudu/util/jsonreader-test.cc:239: Failure
Value of: s.IsInvalidArgument()
  Actual: false
Expected: true
OK
[  FAILED  ] JsonReaderTest.SignedAndUnsignedInts (0 ms)

Change-Id: Ic78691becbca1097676fbf6454d21e66f6ea939e
---
M src/kudu/util/jsonreader-test.cc
1 file changed, 29 insertions(+), 28 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/12648/1
-- 
To view, visit http://gerrit.cloudera.org:8080/12648
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic78691becbca1097676fbf6454d21e66f6ea939e
Gerrit-Change-Number: 12648
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Percy <mp...@apache.org>