From fd6380a0858de7c643c204fd2482d6e98b79c1bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Thu, 6 Sep 2018 16:17:28 +0300 Subject: [PATCH] Found some memory-related bug Former-commit-id: 684f9cbe9f7f8112aff5981215076182051c8235 --- qpms/ewald.c | 2 +- tests/ewalds.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qpms/ewald.c b/qpms/ewald.c index 223be1d..7e57795 100644 --- a/qpms/ewald.c +++ b/qpms/ewald.c @@ -99,7 +99,7 @@ qpms_ewald32_constants_t *qpms_ewald32_constants_init(const qpms_l_t lMax /*, co * pow(0.5, 2*j-1); break; case EWALD32_CONSTANTS_AGNOSTIC: - c->s1_constfacs[y][j] = -2 * ipow(n+1) * M_SQRTPI + c->s1_constfacs[y][j] = -2 * ipow(n+1) * M_SQRTPI // FIXME: Valgrind invalid write * factorial((n-m)/2) * factorial((n+m)/2) * min1pow(j) / (factorial(j) * factorial((n-m)/2-j) * factorial((n+m)/2-j)); diff --git a/tests/ewalds.c b/tests/ewalds.c index 1709a6d..74d24e9 100644 --- a/tests/ewalds.c +++ b/tests/ewalds.c @@ -42,7 +42,7 @@ ewaldtest_triang_params paramslist[] = { { 3, {1.1, 0.23}, 2.3, 0.97, 0.5, 30, 30, 1., TRIANGULAR_VERTICAL}, { 3, {1.1, 0.23}, 2.3, 0.97, 0.9, 30, 30, 1., TRIANGULAR_VERTICAL}, { 3, {1.1, 0.23}, 2.3, 0.97, 1.3, 30, 30, 1., TRIANGULAR_VERTICAL}, - { 3, {1.1, 0.23}, 2.3, 0.97, 1.9, 30, 30, 1., TRIANGULAR_VERTICAL}, + { 6, {1.1, 0.23}, 2.3, 0.97, 1.9, 30, 30, 1., TRIANGULAR_VERTICAL}, // end: // { 0, {0, 0}, 0, 0, 0, 0, 0, 0, 0} };