From d9470e50b2d5da7717a4cd1765e2a9cfbe70899b Mon Sep 17 00:00:00 2001 From: miod Date: Mon, 15 Dec 2014 06:03:15 +0000 Subject: [PATCH] Move 40MB of .rodata and 40MB of stack to .bss; allows this test to run on platforms with small MAXTSIZ or MAXSSIZ. --- regress/lib/libcrypto/gost/gost2814789t.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/regress/lib/libcrypto/gost/gost2814789t.c b/regress/lib/libcrypto/gost/gost2814789t.c index dd92903b426..30aaead34e6 100644 --- a/regress/lib/libcrypto/gost/gost2814789t.c +++ b/regress/lib/libcrypto/gost/gost2814789t.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gost2814789t.c,v 1.1 2014/11/09 19:45:26 miod Exp $ */ +/* $OpenBSD: gost2814789t.c,v 1.2 2014/12/15 06:03:15 miod Exp $ */ /* vim: set fileencoding=ascii : Charset: ASCII */ /* test/gostr2814789t.c */ /* ==================================================================== @@ -1243,6 +1243,9 @@ const g89_tc tcs[] = { } }; +/* const */ unsigned char bZB[40*1024*1024]; +unsigned char bTS[40*1024*1024]; + int main(int argc, char *argv[]) { unsigned int t; @@ -1255,8 +1258,6 @@ int main(int argc, char *argv[]) unsigned char bTest[G89_MAX_TC_LEN]; unsigned char bTest1[G89_MAX_TC_LEN]; uint64_t ullLeft; - static const unsigned char bZB[40*1024*1024] = { 0 }; - static unsigned char bTS[40*1024*1024] = { 0 }; unsigned int mdl = 0; int enlu = 0; int enlf = 0; @@ -1288,6 +1289,9 @@ int main(int argc, char *argv[]) OPENSSL_load_builtin_modules(); OpenSSL_add_all_algorithms(); + memset(bZB, 0, sizeof bZB); + memset(bTS, 0, sizeof bTS); + /* Test load engine */ if(NULL == (md_gost94 = EVP_get_digestbyname(SN_id_GostR3411_94))) { fflush(NULL); -- 2.20.1