Project

General

Profile

Bug #2479

gmx_mtop c++ change exposing bugs in gmx trjconv

Added by Paul Bauer about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
core library
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

The recent change to port gmx_mtop to c++ has exposed some memory corruption bugs in gmx trjconv.
They seem to be related to the use (and subsequent free'ing) of the legacy topology structure that is based on some data structures that are already free'd because the c++ topology has been released at this point.

To fix the issue the gen_local_top routine needs to make explicit copies instead of using pointers to the mtop data structures.

Associated revisions

Revision fbc33cab (diff)
Added by Paul Bauer about 1 year ago

Fix legacy topology memory error

The change to port mtop to c++ has exposed a number of issues in the
legacy topology data structure, where pointers would be copied from a
temporary mtop object to the local topology, and subsequently
invalidated when mtop was correctly free'd.

This change is a bit of wooden mallet applied to the problem, by brute
forcing the assignment of the values that were previously copied by
pointer.

Fixes #2479

Change-Id: I7d702666fa48cb3840f914ee3bd28787d3caeec8

History

#1 Updated by Gerrit Code Review Bot about 1 year ago

Gerrit received a related patchset '1' for Issue #2479.
Uploader: Paul Bauer ()
Change-Id: gromacs~master~I7d702666fa48cb3840f914ee3bd28787d3caeec8
Gerrit URL: https://gerrit.gromacs.org/7767

#2 Updated by Mark Abraham about 1 year ago

  • Category set to core library
  • Assignee set to Paul Bauer
  • Target version set to 2019
  • Affected version changed from 2018 to git master

#3 Updated by Paul Bauer about 1 year ago

  • Status changed from New to Resolved

#4 Updated by Paul Bauer about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF