You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by jbapple-cloudera <gi...@git.apache.org> on 2017/04/01 12:51:45 UTC
[GitHub] thrift pull request #1232: THRIFT-4138: Remove undefined behavior imported f...
GitHub user jbapple-cloudera opened a pull request:
https://github.com/apache/thrift/pull/1232
THRIFT-4138: Remove undefined behavior imported from Boost
Client: C++
There is undefined behavior in boost::lexical_cast that was fixed in
https://github.com/boostorg/lexical_cast/issues/21, but that fix is
only available in recent Boost releases. This patch removes all uses
of lexical_cast instead.
That removes the last undefined behavior, so this patch also makes
ubsan.sh unconditionally fail on undefined behavior.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jbapple-cloudera/thrift boost-vptr
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/1232.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1232
----
commit e8c76d1939ec0f338d4a520ec9e81cfefe6e33b1
Author: Jim Apple <jb...@apache.org>
Date: 2017-03-30T03:39:36Z
THRIFT-4138: Remove undefined behavior imported from Boost
Client: C++
There is undefined behavior in boost::lexical_cast that was fixed in
https://github.com/boostorg/lexical_cast/issues/21, but that fix is
only available in recent Boost releases. This patch removes all uses
of lexical_cast instead.
That removes the last undefined behavior, so this patch also makes
ubsan.sh unconditionally fail on undefined behavior.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift issue #1232: THRIFT-4138: Remove undefined behavior imported from Boo...
Posted by jbapple-cloudera <gi...@git.apache.org>.
Github user jbapple-cloudera commented on the issue:
https://github.com/apache/thrift/pull/1232
UBSan refuses to report an error more than once, and unfortunately it does not have a way to override this behavior. So, once you've seen one UBSan error at a particular line in a particular function, it won't report it again until the binary exits.
I agree that we are not using boost::filesystem::path. This was a different error from https://github.com/boostorg/lexical_cast/blob/boost-1.54.0/include/boost/lexical_cast.hpp#L1620.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift pull request #1232: THRIFT-4138: Remove undefined behavior imported f...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/thrift/pull/1232
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] thrift issue #1232: THRIFT-4138: Remove undefined behavior imported from Boo...
Posted by jeking3 <gi...@git.apache.org>.
Github user jeking3 commented on the issue:
https://github.com/apache/thrift/pull/1232
I'm curious - did every case where lexical_cast was used report this error running in ubsan or was it perhaps just one of them? The original boost defect says, "Undefined behaviour in lexical cast of boost::filesystem::path to std::string". We're not using boost::filesystem::path in any of these locations - it's usually just a simple numeric conversion.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---