From: Berk Hess Date: Mon, 22 Jun 2020 15:27:29 +0000 (+0200) Subject: Fix tpxio function type update table X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=6dc22e0bc8d7ec382aee512875086e20bfc2ed2f;p=alexxy%2Fgromacs.git Fix tpxio function type update table Fix order to incrementing function type. Likely certain older tpr files would have been read incorrectly, usually lead to a memory allocation error. --- diff --git a/docs/release-notes/2020/2020.3.rst b/docs/release-notes/2020/2020.3.rst index 444007c776..dc9f220f18 100644 --- a/docs/release-notes/2020/2020.3.rst +++ b/docs/release-notes/2020/2020.3.rst @@ -19,6 +19,12 @@ Fixes where mdrun could behave incorrectly Fixes for ``gmx`` tools ^^^^^^^^^^^^^^^^^^^^^^^ +Fix incorrect reading of certain older tpr files +"""""""""""""""""""""""""""""""""""""""""""""""" + +Certain older tpr files could be read incorrectly, usually leading to an exit +with a memory allocation error. + Fix segmentation fault with gmx lie """"""""""""""""""""""""""""""""""" diff --git a/src/gromacs/fileio/tpxio.cpp b/src/gromacs/fileio/tpxio.cpp index db5d9d6864..b5906dca12 100644 --- a/src/gromacs/fileio/tpxio.cpp +++ b/src/gromacs/fileio/tpxio.cpp @@ -3,7 +3,8 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team. + * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -203,10 +204,12 @@ static const t_ftupd ftupd[] = { { 72, F_GBPOL_NOLONGERUSED }, { 72, F_NPSOLVATION_NOLONGERUSED }, { 93, F_LJ_RECIP }, + { 76, F_ANHARM_POL }, { 90, F_FBPOSRES }, + { tpxv_VSite2FD, F_VSITE2FD }, + { tpxv_GenericInternalParameters, F_DENSITYFITTING }, { 69, F_VTEMP_NOLONGERUSED }, { 66, F_PDISPCORR }, - { 76, F_ANHARM_POL }, { 79, F_DVDL_COUL }, { 79, @@ -218,8 +221,6 @@ static const t_ftupd ftupd[] = { }, { 79, F_DVDL_RESTRAINT }, { 79, F_DVDL_TEMPERATURE }, - { tpxv_GenericInternalParameters, F_DENSITYFITTING }, - { tpxv_VSite2FD, F_VSITE2FD }, }; #define NFTUPD asize(ftupd)