impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Impala Public Jenkins (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4595: Ignore discarded functions after linking
Date Wed, 07 Dec 2016 22:52:35 GMT
Impala Public Jenkins has submitted this change and it was merged.

Change subject: IMPALA-4595: Ignore discarded functions after linking

IMPALA-4595: Ignore discarded functions after linking

For LLVM IR UDF, Impalad will link an external LLVM module
in which the IR UDF is defined with the main module. If it
happens that a symbol is defined in both modules, LLVM may
choose to discard the one defined in the external module.
The discarded function and its callee will not be present
in the linked module.

In IMPALA-4595, was compiled without any
optimization. Duplicated definition such as StringVal::null()
may have different inlining level between the external module
and the main module. When the duplicated definition in
the external module is discarded, some of its callee
functions (which are not inlined) may not be defined in the
main module so they can no longer be located in the linked
module. This trips up some code in the LlvmCodegen::LinkModule().
In particular, when parsing for functions in external module
which are materialized during linking, certain functions may
not be present due to the reason above. Impalad will hit
a DCHECK in debug build or crash due to null pointer access
in release build.

This change fixes the problem above by taking into account
that certain functions may not be defined anymore after linking.
This change also fixes two incorrect status propagation in

Change-Id: Iaa056a0c888bfcc95b412e1bc1063bb607b58ab7
Reviewed-by: Michael Ho <>
Tested-by: Impala Public Jenkins
M be/src/codegen/
M be/src/service/
M be/src/testutil/
M testdata/workloads/functional-query/queries/QueryTest/udf.test
M tests/query_test/
5 files changed, 76 insertions(+), 11 deletions(-)

  Impala Public Jenkins: Verified
  Michael Ho: Looks good to me, approved

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa056a0c888bfcc95b412e1bc1063bb607b58ab7
Gerrit-PatchSet: 6
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Michael Ho <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Michael Ho <>
Gerrit-Reviewer: Tim Armstrong <>

View raw message