debug mode gives memory overflow in memocc
Posted: Tue Mar 29, 2011 11:25 pm
Hello all (Matteo? Yann? in particular?)
when turning on debug "naughty" you get segfaults inside memocc - the padding functions are being called with ndebug=5 on small arrays with less than 5 elements, which gives a negative address:
==4821== Invalid write of size 4
==4821== at 0x11C9DCB0: __m_profiling_NMOD_i_padding (memocc_cpp.f90:820)
==4821== by 0x11C9E280: __m_profiling_NMOD_mo_i1 (memocc_cpp.f90:1075)
==4821== by 0x11358BF0: __m_ab6_mixing_NMOD_ab6_mixing_new (m_ab6_mixing_cpp.f90:736)
==4821== by 0x10235F50: scfcv (scfcv_cpp.f90:1001)
==4821== by 0x100DD268: *scfcv_stub_in_scfcv_new (in /gpfs/storage/home/ulg32/ulg32347/CODES/ABINIT/6.7.1-private/tmp-seq/src/98_main/abinit)
==4821== by 0x100DEA64: scfcv_new (scfcv_new_cpp.f90:681)
==4821== by 0x101B46AC: gstate (gstate_cpp.f90:1374)
==4821== by 0x10041A0C: gstateimg (gstateimg_cpp.f90:840)
==4821== by 0x100110F4: driver (driver_cpp.f90:954)
==4821== by 0x100050FC: *driver_stub_in_abinit (abinit_cpp.f90:827)
==4821== by 0x10007290: main (abinit_cpp.f90:827)
ciao
Matthieu
when turning on debug "naughty" you get segfaults inside memocc - the padding functions are being called with ndebug=5 on small arrays with less than 5 elements, which gives a negative address:
==4821== Invalid write of size 4
==4821== at 0x11C9DCB0: __m_profiling_NMOD_i_padding (memocc_cpp.f90:820)
==4821== by 0x11C9E280: __m_profiling_NMOD_mo_i1 (memocc_cpp.f90:1075)
==4821== by 0x11358BF0: __m_ab6_mixing_NMOD_ab6_mixing_new (m_ab6_mixing_cpp.f90:736)
==4821== by 0x10235F50: scfcv (scfcv_cpp.f90:1001)
==4821== by 0x100DD268: *scfcv_stub_in_scfcv_new (in /gpfs/storage/home/ulg32/ulg32347/CODES/ABINIT/6.7.1-private/tmp-seq/src/98_main/abinit)
==4821== by 0x100DEA64: scfcv_new (scfcv_new_cpp.f90:681)
==4821== by 0x101B46AC: gstate (gstate_cpp.f90:1374)
==4821== by 0x10041A0C: gstateimg (gstateimg_cpp.f90:840)
==4821== by 0x100110F4: driver (driver_cpp.f90:954)
==4821== by 0x100050FC: *driver_stub_in_abinit (abinit_cpp.f90:827)
==4821== by 0x10007290: main (abinit_cpp.f90:827)
ciao
Matthieu