Project

General

Profile

Bug #984

valgrind errors in grompp

Added by Roland Schulz almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
preprocessing (pdb2gmx,grompp)
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

grompp of complex/tip4p with valgrind gives:

13863 Source and destination overlap in memcpy(0x9c779d0, 0x9c779d0, 104)
13863 at 0x4C2A690: memcpy (mc_replace_strmem.c:838)
13863 by 0x690DA39: clean_vsite_bonds (vsite_parm.c:1023)
13863 by 0x690ED7A: clean_vsite_bondeds (vsite_parm.c:1296)
13863 by 0x407F9D: main (grompp.c:1445)
13863
13863 13863 Syscall param write(buf) points to uninitialised byte(s)
13863 at 0x8093750: __write_nocancel (syscall-template.S:82)
13863 by 0x8038C22: _IO_file_write@GLIBC_2.2.5 (fileops.c:1276)
13863 by 0x8038899: new_do_write (fileops.c:530)
13863 by 0x8038BC4: _IO_do_write
@GLIBC_2.2.5 (fileops.c:503)
13863 by 0x80389FC: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1358)
13863 by 0x802EEDC: fwrite (iofwrite.c:45)
13863 by 0x80CA6D4: xdrstdio_putlong (xdr_stdio.c:122)
13863 by 0x80C8C43: xdr_u_int (xdr.c:134)
13863 by 0x80C9367: xdr_string (xdr.c:685)
13863 by 0x6F71597: do_xdr (gmxfio_xdr.c:236)
13863 by 0x6F7172C: do_xdrwrite (gmxfio_xdr.c:265)
13863 by 0x6FBA52D: gmx_fio_doe_string (gmxfio_rw.c:427)
13863 Address 0x402504c is not stack'd, malloc'd or (recently) free'd

Associated revisions

Revision 988c9f74 (diff)
Added by Roland Schulz almost 7 years ago

Fix overlapping memcpy

The memcpy were not neccessary.

Fixes #984

Change-Id: Iea1d34756444cba2493940ab3f2252e7c108323f

History

#1 Updated by Roland Schulz almost 7 years ago

Forgot pre. Here again with fixed formatting.

==13863== Source and destination overlap in memcpy(0x9c779d0, 0x9c779d0, 104)
==13863==    at 0x4C2A690: memcpy (mc_replace_strmem.c:838)
==13863==    by 0x690DA39: clean_vsite_bonds (vsite_parm.c:1023)
==13863==    by 0x690ED7A: clean_vsite_bondeds (vsite_parm.c:1296)
==13863==    by 0x407F9D: main (grompp.c:1445)
==13863== 
==13863== 

==13863== Syscall param write(buf) points to uninitialised byte(s)
==13863==    at 0x8093750: __write_nocancel (syscall-template.S:82)
==13863==    by 0x8038C22: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1276)
==13863==    by 0x8038899: new_do_write (fileops.c:530)
==13863==    by 0x8038BC4: _IO_do_write@@GLIBC_2.2.5 (fileops.c:503)
==13863==    by 0x80389FC: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1358)
==13863==    by 0x802EEDC: fwrite (iofwrite.c:45)
==13863==    by 0x80CA6D4: xdrstdio_putlong (xdr_stdio.c:122)
==13863==    by 0x80C8C43: xdr_u_int (xdr.c:134)
==13863==    by 0x80C9367: xdr_string (xdr.c:685)
==13863==    by 0x6F71597: do_xdr (gmxfio_xdr.c:236)
==13863==    by 0x6F7172C: do_xdrwrite (gmxfio_xdr.c:265)
==13863==    by 0x6FBA52D: gmx_fio_doe_string (gmxfio_rw.c:427)
==13863==  Address 0x402504c is not stack'd, malloc'd or (recently) free'd

#2 Updated by Roland Schulz almost 7 years ago

It seems the 2nd issue is a problem in the external xdr library (or a false positive). Thus only the 1st is addressed by the patch.

#3 Updated by Szilárd Páll almost 7 years ago

  • Category set to preprocessing (pdb2gmx,grompp)
  • Status changed from New to Feedback wanted

Roland, just want to double-check, this can be considered fixed, right? I could run grompp through valgrind, but I thought I'd ask...

#4 Updated by Roland Schulz almost 7 years ago

  • Status changed from Feedback wanted to Closed

yes

Also available in: Atom PDF