openPMD/openPMD-api

ADIOS1 Destructors Must Not Throw

Ouverte

#550 ouverte le 18 août 2019

 (2 commentaires) (0 réaction) (0 personne assignée)C++ (57 forks)auto 404
backend: ADIOS1buggood first issuehelp wanted

Métriques du dépôt

Stars
 (160 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

Describe the bug Destructors may not fail in clean C++, which otherwise makes object destruction and associated resource occupation unreliable. Also given by C++ core guidelines.

To Reproduce Compile the project with clang-tidy-7 or newer with enabled ADIOS1 backend. The warning bugprone-exception-escape will be visible in ParallelADIOS1IOHandlerImpl::~ParallelADIOS1IOHandlerImpl() (src/IO/ADIOS/ParallelADIOS1IOHandler.cpp) and ADIOS1IOHandlerImpl::~ADIOS1IOHandlerImpl() (src/IO/ADIOS/ADIOS1IOHandler.cpp).

Example:

# in directory $HOME/src/openPMD-api
mkdir build && cd build

CXX=clang++-7 CC=clang-7 cmake -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy-7);-system-headers=0" -DCMAKE_CXX_STANDARD=17 -DopenPMD_USE_PYTHON=OFF ..
make

Expected behavior A clear and concise description of what you expected to happen.

Software Environment

  • version of openPMD-api: 0.9.0-alpha-18-g0bf8862
  • installed openPMD-api via: from source
  • operating system: Ubuntu 18.04
  • machine: local x86
  • name and version of Python implementation: N/A
  • version of HDF5: 1.10.5
  • version of ADIOS1: 1.13.1
  • name and version of MPI: MPICH 3.3.1

Guide contributeur