Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-4664

[C++] DCHECK macro conditions are evaluated in release builds

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.13.0
    • Component/s: C++

      Description

      DCHECK(potentially_expensive()) will evaluate the argument even in release mode, and is used in several places with the assumption that it will do so (which means removing the guarantee of evaluation causes numerous failures). By contrast, most debug assertion macros elide their arguments entirely (<cassert>.assert, <glog/logging.h>) in release mode

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wesm Wes McKinney
                Reporter:
                bkietz Ben Kietzman
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h