Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-8196

IR UDFs should not allow importing symbols with hidden visibility

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Impala 3.1.0
    • None
    • Backend

    Description

      Discovered while working on IMPALA-8187, as part of which i'll add a test showing the behaviour

      If an IR module has some hidden symbols in it, e.g. like the following, then we can actually create a UDF that calls the hidden symbol. This is inconsistent with the shared object UDFs.

      ; Function Attrs: norecurse nounwind uwtable
      define hidden { i8, i64 } @_Z16UnexportedSymbolPN10impala_udf15FunctionContextE(%"class.impala_udf::FunctionContext"* nocapture readnone) local_unnamed_addr #3 {
        %2 = alloca %"struct.impala_udf::BigIntVal", align 8
        call void @_ZN10impala_udf9BigIntValC2El(%"struct.impala_udf::BigIntVal"* nonnull %2, i64 5)
        %3 = getelementptr inbounds %"struct.impala_udf::BigIntVal", %"struct.impala_udf::BigIntVal"* %2, i64 0, i32 0, i32 0
        %4 = load i8, i8* %3, align 8
        %5 = insertvalue { i8, i64 } undef, i8 %4, 0
        %6 = getelementptr inbounds %"struct.impala_udf::BigIntVal", %"struct.impala_udf::BigIntVal"* %2, i64 0, i32 1
        %7 = load i64, i64* %6, align 8
        %8 = insertvalue { i8, i64 } %5, i64 %7, 1
        ret { i8, i64 } %8
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            tarmstrong Tim Armstrong
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: