fix ASAN reports about mismatched emplace new/delete

* spot/misc/bitvect.cc, spot/misc/bitvect.hh, spot/tl/formula.cc,
spot/tl/formula.hh: Here.
* NEWS: Mention the bug.
This commit is contained in:
Alexandre Duret-Lutz 2017-11-17 17:22:02 +01:00
parent 933c4cde0c
commit d89579321f
5 changed files with 32 additions and 17 deletions

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2013, 2014, 2015, 2016 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2013-2017 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -76,6 +76,12 @@ namespace spot
bitvect* clone() const;
void operator delete(void *ptr)
{
// This object was allocated using a placement new.
::operator delete(ptr);
}
void make_empty()
{
size_ = 0;
@ -398,6 +404,12 @@ namespace spot
at(i).~bitvect();
}
void operator delete(void *ptr)
{
// This object was allocated using a placement new.
::operator delete(ptr);
}
/// The number of bitvect in the array.
size_t size() const
{