You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Wes McKinney (Jira)" <ji...@apache.org> on 2020/07/16 03:07:00 UTC
[jira] [Updated] (ARROW-9500) [C++] Fix segfault with
std::to_string in -O3 builds on gcc 7.5.0
[ https://issues.apache.org/jira/browse/ARROW-9500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wes McKinney updated ARROW-9500:
--------------------------------
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
{code}
return Status::Invalid("Float value ", std::to_string(val), " was truncated converting to",
*output.type());
{code}
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
was:
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
{code}
return Status::Invalid("Float value ", std::to_string(val), " was truncated converting to",
*output.type());
{code}
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
> [C++] Fix segfault with std::to_string in -O3 builds on gcc 7.5.0
> -----------------------------------------------------------------
>
> Key: ARROW-9500
> URL: https://issues.apache.org/jira/browse/ARROW-9500
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Reporter: Wes McKinney
> Assignee: Wes McKinney
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.0.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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
> {code}
> return Status::Invalid("Float value ", std::to_string(val), " was truncated converting to",
> *output.type());
> {code}
> 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
--
This message was sent by Atlassian Jira
(v8.3.4#803005)