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

[C++] Fix segfault with std::to_string in -O3 builds on gcc 7.5.0

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • C++

    Description

      There seems to be a gcc bug related to std::to_string that only appears in -O3 builds. It can be seen in something innocuous like

          return Status::Invalid("Float value ", std::to_string(val), " was truncated converting to",
                                 *output.type());
      

      where val is NaN. I haven't found a canonical reference but using something other than to_string for the formatting (here just letting std::ostringstream take care of it) makes the problem go away

      I wasn't able to reproduce the issue with gcc-8

      EDIT: it's a known bug in gcc https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86274

      Attachments

        Issue Links

          Activity

            People

              wesm Wes McKinney
              wesm Wes McKinney
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 40m
                  40m

                  Slack

                    Issue deployment