Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Impala 2.8.0
    • Fix Version/s: Impala 2.8.0
    • Component/s: Backend
    • Labels:

      Description

      I ran into this on a private build but it looks like we will hit it with the ASAN build.

      [==========] Running 1 test from 1 test case.
      [----------] Global test environment set-up.
      [----------] 1 test from StringCompareTest
      [ RUN      ] StringCompareTest.Basic
      be/src/runtime/string-compare-test.cc:32: Failure
      Value of: StringCompare(l.c_str(), l.size(), r.c_str(), r.size(), cmp_len)
        Actual: 126
      Expected: strncmp(l.c_str(), r.c_str(), cmp_len)
      Which is: 1
      be/src/runtime/string-compare-test.cc:32: Failure
      Value of: StringCompare(l.c_str(), l.size(), r.c_str(), r.size(), cmp_len)
        Actual: -126
      Expected: strncmp(l.c_str(), r.c_str(), cmp_len)
      Which is: -1
      be/src/runtime/string-compare-test.cc:32: Failure
      Value of: StringCompare(l.c_str(), l.size(), r.c_str(), r.size(), cmp_len)
        Actual: 127
      Expected: strncmp(l.c_str(), r.c_str(), cmp_len)
      Which is: 1
      be/src/runtime/string-compare-test.cc:32: Failure
      Value of: StringCompare(l.c_str(), l.size(), r.c_str(), r.size(), cmp_len)
        Actual: -127
      Expected: strncmp(l.c_str(), r.c_str(), cmp_len)
      Which is: -1
      be/src/runtime/string-compare-test.cc:32: Failure
      Value of: StringCompare(l.c_str(), l.size(), r.c_str(), r.size(), cmp_len)
        Actual: 254
      

        Activity

        Hide
        tarmstrong Tim Armstrong added a comment -

        I'm guessing this is related to "IMPALA-4436: StringValue::StringCompare() should match strncmp()" so assigning to you Dan Hecht

        Show
        tarmstrong Tim Armstrong added a comment - I'm guessing this is related to " IMPALA-4436 : StringValue::StringCompare() should match strncmp()" so assigning to you Dan Hecht
        Hide
        dhecht Dan Hecht added a comment -

        Yeah, looks like only the sign of the strncmp() return value is specified, so apparently clang implementation returns -1, 0, 1. Will fix the test.

        Show
        dhecht Dan Hecht added a comment - Yeah, looks like only the sign of the strncmp() return value is specified, so apparently clang implementation returns -1, 0, 1. Will fix the test.
        Hide
        dhecht Dan Hecht added a comment -

        commit ab0d21ab797a4511ef2717d1331ebda5cec7bfec
        Author: Dan Hecht <dhecht@cloudera.com>
        Date: Wed Nov 16 12:07:50 2016 -0800

        IMPALA-4493: fix string-compare-test when using clang

        Only the 0 value or sign bit is specified in the return
        value for strncmp(), so fix up the test accordingly.

        Testing:

        • verified the new test still reproduces IMPALA-4436
        • verify the new test passes under ASAN build

        Change-Id: I5d82ac2bff33fdbf66275fcfc6558c4bc29de5e7
        Reviewed-on: http://gerrit.cloudera.org:8080/5110
        Reviewed-by: Jim Apple <jbapple@cloudera.com>
        Tested-by: Internal Jenkins

        Show
        dhecht Dan Hecht added a comment - commit ab0d21ab797a4511ef2717d1331ebda5cec7bfec Author: Dan Hecht <dhecht@cloudera.com> Date: Wed Nov 16 12:07:50 2016 -0800 IMPALA-4493 : fix string-compare-test when using clang Only the 0 value or sign bit is specified in the return value for strncmp(), so fix up the test accordingly. Testing: verified the new test still reproduces IMPALA-4436 verify the new test passes under ASAN build Change-Id: I5d82ac2bff33fdbf66275fcfc6558c4bc29de5e7 Reviewed-on: http://gerrit.cloudera.org:8080/5110 Reviewed-by: Jim Apple <jbapple@cloudera.com> Tested-by: Internal Jenkins

          People

          • Assignee:
            dhecht Dan Hecht
            Reporter:
            tarmstrong Tim Armstrong
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development