impala-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tarmstr...@apache.org
Subject [38/50] incubator-impala git commit: IMPALA-3285: Fix ASAN failure in webserver-test
Date Tue, 12 Apr 2016 21:19:12 GMT
IMPALA-3285: Fix ASAN failure in webserver-test

This patch fixes a test ASAN issue where a RapidJson value was 'moved',
rather than copied, into a Document object; the original was the deleted
and the moved version became invalid.

Change-Id: Ib0c71163af14c6f18e785938712caf193a393794
Reviewed-on: http://gerrit.cloudera.org:8080/2737
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Tested-by: Internal Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/b085e31f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/b085e31f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/b085e31f

Branch: refs/heads/master
Commit: b085e31ff415e5eea56fa7dc6d35b508ed313e7c
Parents: 9bb1b8a
Author: Henry Robinson <henry@cloudera.com>
Authored: Fri Apr 8 13:10:40 2016 -0700
Committer: Tim Armstrong <tarmstrong@cloudera.com>
Committed: Tue Apr 12 14:03:43 2016 -0700

----------------------------------------------------------------------
 be/src/util/webserver-test.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/b085e31f/be/src/util/webserver-test.cc
----------------------------------------------------------------------
diff --git a/be/src/util/webserver-test.cc b/be/src/util/webserver-test.cc
index 392334b..094587c 100644
--- a/be/src/util/webserver-test.cc
+++ b/be/src/util/webserver-test.cc
@@ -289,8 +289,9 @@ TEST(Webserver, DirectoryListingDisabledTest) {
 }
 
 void FrameCallback(const Webserver::ArgumentMap& args, Document* document) {
-  const string& contents = "<frameset cols='50%,50%'><frame src='/metrics'></frameset>";
-  document->AddMember("contents", contents.c_str(), document->GetAllocator());
+  const string contents = "<frameset cols='50%,50%'><frame src='/metrics'></frameset>";
+  Value value(contents.c_str(), document->GetAllocator());
+  document->AddMember("contents", value, document->GetAllocator());
 }
 
 TEST(Webserver, NoFrameEmbeddingTest) {


Mime
View raw message