-
Notifications
You must be signed in to change notification settings - Fork 133
Open
Description
Expected Behavior
#include <boost/ut.hpp>
#include <array>
#include <tuple>
using namespace boost::ut;
struct my_expensive_type {
std::array<int, 1'000'000> data;
};
int main() {
"test"_test = []<typename T>() { expect(that % sizeof(T) > 0); } |
std::tuple<my_expensive_type>{};
}This should compile and run, perhaps with a change to the API (i.e., not instantiate tuple).
Actual Behavior
This compiles, but generates a segfault at runtime (stack exhausted).
Steps to Reproduce the Problem
- Compile and run the test above.
Specifications
- Version: 1.1.9
- Platform: Linux x86_64
- Subsystem: g++ v10.3.0
Extra information
The example above is contrived, but the issue is real. This test should not create any instance of the tested type, since no instance is actually used. Actual instances may be created inside the test body, but this should be left up to the user to decide. Here the type cannot be created on the stack, hence cannot be used in parameterized tests.
Metadata
Metadata
Assignees
Labels
No labels