Opened 5 years ago

Closed 5 years ago

#332 closed defect (fixed)

Build fails with gcc7 in debug mode when trace file is enabled

Reported by: ksuehring Owned by:
Priority: minor Milestone: VTM-5.1
Component: VTM Version: VTM-5.0
Keywords: Cc: ksuehring, XiangLi, fbossen, jvet@…

Description

With #define ENABLE_TRACING 1 the variant of gcc7 that is included in Ubuntu 18.04 fails with the following error:

home/bboe201/jenkins/workspace/VVCSoftware_VTM_pc/source/Lib/EncoderLib/InterSearch.cpp: In member function ‘void InterSearch::xPredAffineInterSearch(PredictionUnit&, PelUnitBuf&, int, uint32_t&, Distortion&, Mv (*)[33], Mv (*)[33][3], int*, uint8_t, bool, uint32_t)’:
/home/bboe201/jenkins/workspace/VVCSoftware_VTM_pc/source/Lib/EncoderLib/InterSearch.cpp:4718:79: error: array subscript is above array bounds [-Werror=array-bounds]
           mvFour[i] = affine4Para ? m_affineMotion.acMvAffine4Para[iRefList][i] : m_affineMotion.acMvAffine6Para[iRefList][i];
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

This seems to be a false alert that may be triggered by file size, or anything else that confuses the optimizer.

I checked the code and found that there is no actual access to fields that don't exist.

Changing acMvAffine4Para[2][2] to acMvAffine4Para[2][3] is a functioning workaround.

Note: I could not reproduce the issue with gcc7 on macOS or Scientific Linux.

Change history (2)

comment:1 Changed 5 years ago by ksuehring

comment:2 Changed 5 years ago by XiangLi

  • Milestone set to VTM-5.1
  • Resolution set to fixed
  • Status changed from new to closed

Fixed as suggested.

Note: See TracTickets for help on using tickets.