Skip to content

Commit

Permalink
[libcxx] Fix for ALL undefined behavior in <list>.
Browse files Browse the repository at this point in the history
Summary:
This patch fixes std::list for builtin pointer types in the current ABI version and fixes std::list for all fancy pointer types in the next ABI version. The patch was designed to minimize the amount of code needed to support both ABI configurations. Currently only ~5 lines of code differ.


Reviewers: danalbert, jroelofs, mclow.lists

Subscribers: dexonsmith, awi, cfe-commits

Differential Revision: http://reviews.llvm.org/D12299

llvm-svn: 256652
  • Loading branch information
EricWF committed Dec 30, 2015
1 parent 50d5b97 commit b88ea35
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 129 deletions.
2 changes: 2 additions & 0 deletions libcxx/include/__config
Expand Up @@ -39,6 +39,8 @@
#define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
// Fix deque iterator type in order to support incomplete types.
#define _LIBCPP_ABI_INCOMPLETE_TYPES_IN_DEQUE
// Fix undefined behavior in how std::list stores it's linked nodes.
#define _LIBCPP_ABI_LIST_REMOVE_NODE_POINTER_UB
#endif

#define _LIBCPP_CONCAT1(_LIBCPP_X,_LIBCPP_Y) _LIBCPP_X##_LIBCPP_Y
Expand Down

0 comments on commit b88ea35

Please sign in to comment.