[PATCH] D15539: [libcxxabi] Reducing stack usage of test

Marshall Clow via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 9 07:39:20 PST 2016


mclow.lists added a comment.

I think you've reduced the scope of the tests significantly with this change.

If you want to make the objects smaller, that's fine - but please heed Howard's advice in the email thread:

- Don't make them too small.  (three digits is better than two)
- Keep the object sizes odd, and their differences more than the max alignment for your platform.


================
Comment at: test/dynamic_cast14.pass.cpp:18
@@ -17,3 +17,3 @@
 {
-    char _[43981];
+    long double _[13];
     virtual ~A1() {}
----------------
Using long double here (instead of char) forces alignment; reducing the scope of the tests.
(and means that the sizes are always an even number, and (probably) a multiple of 8.

================
Comment at: test/dynamic_cast14.pass.cpp:36
@@ -35,3 +35,3 @@
 {
-    char _[93481];
+    long double _[23];
     virtual ~A3() {}
----------------
@Howard.Hinnant wrote in the email thread:
> If you need to reduce these numbers for other platforms, I think that would be fine. However I would not reduce them to double digits.  I would keep them as large as you can reasonably get away with.


http://reviews.llvm.org/D15539





More information about the cfe-commits mailing list