You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/01/30 13:21:00 UTC
[jira] [Commented] (IMPALA-5031) UBSAN clean and method for testing
UBSAN cleanliness
[ https://issues.apache.org/jira/browse/IMPALA-5031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16756087#comment-16756087 ]
ASF subversion and git services commented on IMPALA-5031:
---------------------------------------------------------
Commit e111627888dd1072aceabb81c4a88fec63a1e345 in impala's branch refs/heads/master from Jim Apple
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=e111627 ]
IMPALA-5031: out-of-range enum values are undefined behavior
This patch adds a utility, Ubsan::EnumToInt(), that can take a pointer
to an enumeration value and return its integral value without invoking
undefined behavior. This is not as simple as "int i = *pe" because (a)
the underlying integral type might not be int, and (b) if pe points to
a value outside of the range of the enum as defined in the standard
(section dcl.enum), then dereferencing it is undefined behavior.
This fixes errors found in the end-to-end tests:
exec/parquet/parquet-metadata-utils.cc:215:26: runtime error: load
of value 5000, which is not a valid value for type
'CompressionCodec::type'
exec/parquet/parquet-metadata-utils.cc:216:26: runtime error: load
of value 5000, which is not a valid value for type
'CompressionCodec::type'
exec/parquet/parquet-metadata-utils.cc:217:26: runtime error: load
of value 5000, which is not a valid value for type
'CompressionCodec::type'
exec/parquet/parquet-metadata-utils.cc:219:47: runtime error: load
of value 5000, which is not a valid value for type
'CompressionCodec::type'
exec/parquet/parquet-metadata-utils.cc:501:22: runtime error: load
of value 4294967278, which is not a valid value for type
'FieldRepetitionType::type'
exec/parquet/parquet-metadata-utils.cc:503:29: runtime error: load
of value 4294967278, which is not a valid value for type
'FieldRepetitionType::type'
Change-Id: Iecdf301065da8f091a274e7a0585a11fcc79da7d
Reviewed-on: http://gerrit.cloudera.org:8080/12280
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
> 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: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org