EricWF added a comment.

It's almost there.

Please move "fallback_malloc.ipp" into "fallback_malloc.cpp"  and then delete 
it all together. We can't have other files trying to include it.


================
Comment at: src/fallback_malloc.cpp:23
@@ +22,3 @@
+namespace __cxxabiv1 {
+
+void * __cxa_malloc_with_fallback(size_t size) {
----------------
I think we should have the `pragma GCC visibility push(hidden)` in this file as 
well, but I'm not 100% sure.

================
Comment at: test/test_exception_storage_nodynmem.pass.cpp:13
@@ +12,3 @@
+// Override calloc to simulate exhaustion of dynamic memory
+void *calloc(size_t, size_t) { return 0; }
+
----------------
Let's check that we actually replace `calloc` here and assert that our 
replacement has been called at the end of main.

================
Comment at: test/test_exception_storage_nodynmem.pass.cpp:16
@@ +15,3 @@
+int main(int argc, char *argv[]) {
+  try {
+    throw 42;
----------------
Let's perform this test a couple of times so we're testing
* The memory get's returned properly
* The returned memory can be reused.


http://reviews.llvm.org/D17815



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to