[PATCH] D17815: [libc++abi] Use fallback_malloc to allocate __cxa_eh_globals in case of dynamic memory exhaustion.
Igor Kudrin via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 19 08:10:13 PDT 2016
ikudrin updated this revision to Diff 54189.
ikudrin added a comment.
- Moved the content of `fallback_malloc.ipp` into `falback_malloc.cpp`.
- Removed `fallback_malloc.ipp`.
- Added `pragma GCC visibility push(hidden)` for the function's definitions.
- Added a check that the overwritten `calloc` is called to the test.
- Added a loop to run the test several times.
Please note that `test_fallback_malloc.pass.cpp` now has to #include `fallback_malloc.cpp`, because `fallback_malloc.ipp` was removed. I'd considered some other options, including declaring additional functions especially for testing purpose and even moving all fallback_malloc functionality into a separate class which could be tested independently. However, eventually, I found them more difficult and even much worse than the presented approach.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 21322 bytes
Desc: not available
More information about the cfe-commits