[ 
https://issues.apache.org/jira/browse/IMPALA-5031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16850224#comment-16850224
 ] 

ASF subversion and git services commented on IMPALA-5031:
---------------------------------------------------------

Commit 7ea8c5706db5d2e7424d687465d702f01eef8824 in impala's branch 
refs/heads/master from Jim Apple
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=7ea8c57 ]

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 <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> UBSAN clean and method for testing UBSAN cleanliness
> ----------------------------------------------------
>
>                 Key: IMPALA-5031
>                 URL: https://issues.apache.org/jira/browse/IMPALA-5031
>             Project: IMPALA
>          Issue Type: Task
>          Components: Backend, Infrastructure
>    Affects Versions: Impala 2.9.0
>            Reporter: Jim Apple
>            Assignee: Jim Apple
>            Priority: Minor
>
> http://releases.llvm.org/3.8.0/tools/clang/docs/UndefinedBehaviorSanitizer.html
>  builds are supported after https://gerrit.cloudera.org/#/c/6186/, but 
> Impala's test suite triggers many errors under UBSAN. Those errors should be 
> fixed and then there should be a way to run the test suite under UBSAN and 
> fail if there were any errors detected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to