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

[C++] Do not return buffers containing nullptr from internal allocations

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.11.1
    • 0.12.0
    • C++

    Description

      When a 0-byte buffer is allocated, or at the start of a BufferBuilder, the buffer's data pointer can be null. This leads to passing null arguments (with zero sizes) to standard functions such as memset() and memcpy() in many places. UBSAN doesn't like it.

      Since a null pointer often means "failed allocating" or "programmer error", we might want to use a non-null pointer to a static empty piece of data instead.

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              apitrou Antoine Pitrou
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 20m
                  20m