Fix tpxio function type update table
authorBerk Hess <hess@kth.se>
Mon, 22 Jun 2020 15:27:29 +0000 (17:27 +0200)
committerBerk Hess <hess@kth.se>
Mon, 22 Jun 2020 15:27:29 +0000 (17:27 +0200)
Fix order to incrementing function type. Likely certain older tpr
files would have been read incorrectly, usually lead to a memory
allocation error.

docs/release-notes/2020/2020.3.rst
src/gromacs/fileio/tpxio.cpp

index 444007c776902400667b187286fb47039e3699e9..dc9f220f1885f5278170e0f9c46f2135b2cf149e 100644 (file)
@@ -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
 """""""""""""""""""""""""""""""""""
 
index db5d9d68644b4507faa90e993ec30b4cf1bf3c56..b5906dca12b0c1140b40971af5cce1c45ffac0ea 100644 (file)
@@ -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)