You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Jim Apple (Code Review)" <ge...@cloudera.org> on 2019/05/26 06:19:01 UTC
[Impala-ASF-CR] IMPALA-5031: Out-of-range enum values are undefined behavior
Jim Apple has uploaded this change for review. ( http://gerrit.cloudera.org:8080/13438
Change subject: IMPALA-5031: Out-of-range enum values are undefined behavior
......................................................................
IMPALA-5031: Out-of-range enum values are undefined behavior
This patch handles an undefined behavior in the custom cluster tests
in which a reference to an invalid enum value is used. To prevent the
invalid value, the bytes are first copied into their underlying
integer type.
The undefined behavior happens in LdapJdbcTest. The relevant backtrace
is:
include/c++/4.9.2/bits/stl_algobase.h:199:11: runtime error: load
of value 8, which is not a valid value for type 'const
TProtocolVersion::type'
#0 TProtocolVersion::type const&
min<TProtocolVersion::type>(TProtocolVersion::type const&,
TProtocolVersion::type const&)
include/c++/4.9.2/bits/stl_algobase.h:199:11
#1 ImpalaServer::OpenSession(TOpenSessionResp&, TOpenSessionReq
const&) service/impala-hs2-server.cc:304:24
#2 TCLIServiceProcessor::process_OpenSession(int, TProtocol*,
TProtocol*, void*)
generated-sources/gen-cpp/TCLIService.cpp:4953:13
#3 TCLIServiceProcessor::dispatchCall(TProtocol*, TProtocol*,
string const&, int, void*)
generated-sources/gen-cpp/TCLIService.cpp:4926:3
#4 ImpalaHiveServer2ServiceProcessor::dispatchCall(TProtocol*,
TProtocol*, string const&, int, void*)
generated-sources/gen-cpp/ImpalaHiveServer2Service.cpp:505:73
#5 thrift::TDispatchProcessor::process
(boost::shared_ptr<TProtocol>, boost::shared_ptr<TProtocol>,
void*)
toolchain/thrift-0.9.3-p5/include/thrift/TDispatchProcessor.h:121:12
#6 thrift::server::TAcceptQueueServer::Task::run()
rpc/TAcceptQueueServer.cpp:74:26
#7 ThriftThread::RunRunnable(boost::shared_ptr
<thrift::concurrency::Runnable>, Promise<unsigned long,
(PromiseMode)0>*) rpc/thrift-thread.cc:74:13
Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
---
M be/src/service/impala-hs2-server.cc
1 file changed, 14 insertions(+), 5 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/38/13438/1
--
To view, visit http://gerrit.cloudera.org:8080/13438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
Gerrit-Change-Number: 13438
Gerrit-PatchSet: 1
Gerrit-Owner: Jim Apple <jb...@apache.org>
[Impala-ASF-CR] IMPALA-5031: Out-of-range enum values are undefined behavior
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/13438 )
Change subject: IMPALA-5031: Out-of-range enum values are undefined behavior
......................................................................
Patch Set 2:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/4325/ DRY_RUN=false
--
To view, visit http://gerrit.cloudera.org:8080/13438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
Gerrit-Change-Number: 13438
Gerrit-PatchSet: 2
Gerrit-Owner: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 28 May 2019 04:51:06 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-5031: Out-of-range enum values are undefined behavior
Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change. ( http://gerrit.cloudera.org:8080/13438 )
Change subject: IMPALA-5031: Out-of-range enum values are undefined behavior
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/13438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
Gerrit-Change-Number: 13438
Gerrit-PatchSet: 1
Gerrit-Owner: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 28 May 2019 03:34:30 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-5031: Out-of-range enum values are undefined behavior
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/13438 )
Change subject: IMPALA-5031: Out-of-range enum values are undefined behavior
......................................................................
Patch Set 3:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/4329/ DRY_RUN=false
--
To view, visit http://gerrit.cloudera.org:8080/13438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
Gerrit-Change-Number: 13438
Gerrit-PatchSet: 3
Gerrit-Owner: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 28 May 2019 15:22:11 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-5031: Out-of-range enum values are undefined behavior
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/13438 )
Change subject: IMPALA-5031: Out-of-range enum values are undefined behavior
......................................................................
Patch Set 3: Verified+1
--
To view, visit http://gerrit.cloudera.org:8080/13438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
Gerrit-Change-Number: 13438
Gerrit-PatchSet: 3
Gerrit-Owner: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 28 May 2019 21:36:40 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-5031: Out-of-range enum values are undefined behavior
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/13438 )
Change subject: IMPALA-5031: Out-of-range enum values are undefined behavior
......................................................................
IMPALA-5031: Out-of-range enum values are undefined behavior
This patch handles an undefined behavior in the custom cluster tests
in which a reference to an invalid enum value is used. To prevent the
invalid value, the bytes are first copied into their underlying
integer type.
The undefined behavior happens in LdapJdbcTest. The relevant backtrace
is:
include/c++/4.9.2/bits/stl_algobase.h:199:11: runtime error: load
of value 8, which is not a valid value for type 'const
TProtocolVersion::type'
#0 TProtocolVersion::type const&
min<TProtocolVersion::type>(TProtocolVersion::type const&,
TProtocolVersion::type const&)
include/c++/4.9.2/bits/stl_algobase.h:199:11
#1 ImpalaServer::OpenSession(TOpenSessionResp&, TOpenSessionReq
const&) service/impala-hs2-server.cc:304:24
#2 TCLIServiceProcessor::process_OpenSession(int, TProtocol*,
TProtocol*, void*)
generated-sources/gen-cpp/TCLIService.cpp:4953:13
#3 TCLIServiceProcessor::dispatchCall(TProtocol*, TProtocol*,
string const&, int, void*)
generated-sources/gen-cpp/TCLIService.cpp:4926:3
#4 ImpalaHiveServer2ServiceProcessor::dispatchCall(TProtocol*,
TProtocol*, string const&, int, void*)
generated-sources/gen-cpp/ImpalaHiveServer2Service.cpp:505:73
#5 thrift::TDispatchProcessor::process
(boost::shared_ptr<TProtocol>, boost::shared_ptr<TProtocol>,
void*)
toolchain/thrift-0.9.3-p5/include/thrift/TDispatchProcessor.h:121:12
#6 thrift::server::TAcceptQueueServer::Task::run()
rpc/TAcceptQueueServer.cpp:74:26
#7 ThriftThread::RunRunnable(boost::shared_ptr
<thrift::concurrency::Runnable>, Promise<unsigned long,
(PromiseMode)0>*) rpc/thrift-thread.cc:74:13
Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
Reviewed-on: http://gerrit.cloudera.org:8080/13438
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M be/src/service/impala-hs2-server.cc
1 file changed, 14 insertions(+), 5 deletions(-)
Approvals:
Impala Public Jenkins: Looks good to me, approved; Verified
--
To view, visit http://gerrit.cloudera.org:8080/13438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
Gerrit-Change-Number: 13438
Gerrit-PatchSet: 4
Gerrit-Owner: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
[Impala-ASF-CR] IMPALA-5031: Out-of-range enum values are undefined behavior
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/13438 )
Change subject: IMPALA-5031: Out-of-range enum values are undefined behavior
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/13438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
Gerrit-Change-Number: 13438
Gerrit-PatchSet: 3
Gerrit-Owner: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 28 May 2019 15:22:10 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-5031: Out-of-range enum values are undefined behavior
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/13438 )
Change subject: IMPALA-5031: Out-of-range enum values are undefined behavior
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/13438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
Gerrit-Change-Number: 13438
Gerrit-PatchSet: 2
Gerrit-Owner: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 28 May 2019 04:51:05 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-5031: Out-of-range enum values are undefined behavior
Posted by "Jim Apple (Code Review)" <ge...@cloudera.org>.
Jim Apple has posted comments on this change. ( http://gerrit.cloudera.org:8080/13438 )
Change subject: IMPALA-5031: Out-of-range enum values are undefined behavior
......................................................................
Patch Set 3:
> Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/4325/
Looks like a fluke to me. Rebuilt fine. Running pre-merge tests again, from the top
--
To view, visit http://gerrit.cloudera.org:8080/13438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
Gerrit-Change-Number: 13438
Gerrit-PatchSet: 3
Gerrit-Owner: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 28 May 2019 15:22:42 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-5031: Out-of-range enum values are undefined behavior
Posted by "Jim Apple (Code Review)" <ge...@cloudera.org>.
Jim Apple has posted comments on this change. ( http://gerrit.cloudera.org:8080/13438 )
Change subject: IMPALA-5031: Out-of-range enum values are undefined behavior
......................................................................
Patch Set 1:
Hi Tim! After this patch is in, the custom cluster tests can be added to the UBSAN pre-merge Jenkins job.
--
To view, visit http://gerrit.cloudera.org:8080/13438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
Gerrit-Change-Number: 13438
Gerrit-PatchSet: 1
Gerrit-Owner: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Sun, 26 May 2019 19:09:01 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-5031: Out-of-range enum values are undefined behavior
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/13438 )
Change subject: IMPALA-5031: Out-of-range enum values are undefined behavior
......................................................................
Patch Set 2: Verified-1
Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/4325/
--
To view, visit http://gerrit.cloudera.org:8080/13438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
Gerrit-Change-Number: 13438
Gerrit-PatchSet: 2
Gerrit-Owner: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 28 May 2019 10:21:00 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-5031: Out-of-range enum values are undefined behavior
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/13438 )
Change subject: IMPALA-5031: Out-of-range enum values are undefined behavior
......................................................................
Patch Set 1:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/3396/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/13438
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I63379b4c9d2e4738e729a556108c77fed85e6b64
Gerrit-Change-Number: 13438
Gerrit-PatchSet: 1
Gerrit-Owner: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Sun, 26 May 2019 06:57:46 +0000
Gerrit-HasComments: No