Skip to content

Commit 2d37ee8

Browse files
authored
MONGOCRYPT-775 make tester object static (#983)
Keep the large `tester` object off of the stack to address observed segfaults on Windows when increasing TEST_DATA_COUNT
1 parent ebd6f80 commit 2d37ee8

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

test/test-mongocrypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ static void test_tmp_bsonf(_mongocrypt_tester_t *tester) {
915915
bool _aes_ctr_is_supported_by_os = true;
916916

917917
int main(int argc, char **argv) {
918-
_mongocrypt_tester_t tester = {0};
918+
static _mongocrypt_tester_t tester = {0};
919919
int i;
920920

921921
TEST_PRINTF("Pass a list of patterns to run a subset of tests.\n");

test/test-mongocrypt.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ typedef enum tester_mongocrypt_flags {
4747
} tester_mongocrypt_flags;
4848

4949
/* Arbitrary max of 2148 instances of temporary test data. Increase as needed.
50-
* TODO(MONGOCRYPT-775) increasing further (e.g. 3000+) causes a segfault on Windows test runs. Revise.
5150
*/
5251
#define TEST_DATA_COUNT 2148
5352

0 commit comments

Comments
 (0)