Segfault in destrucor of copy constructor in lhapdf
Created by: scarrazza
Issue by Zaharid Wednesday Jun 28, 2017 at 11:13 GMT Originally opened as https://github.com/NNPDF/libnnpdf/issues/17
I found the following problem when trying to make the wrapper:
The following example:
#include <NNPDF/lhapdfset.h>
int main(void){
auto pdf = NNPDF::LHAPDFSet("NNPDF31_nlo_as_0118", 1);
auto x = new (NNPDF::LHAPDFSet)(pdf);
delete x;
}
compiled with:
#meson.build
project('nnpdf', 'cpp')
deps = [dependency('nnpdf'), dependency('lhapdf')]
executable('exe', 'xx.cc', dependencies:deps)
Segfaults somewhere in the destructor:
$ ./exe
PDF: NNPDF31_nlo_as_0118 ErrorType: No Errors booked
LHAPDF 6.1.6 loading /usr/local/share/LHAPDF/NNPDF31_nlo_as_0118/NNPDF31_nlo_as_0118_0001.dat
NNPDF31_nlo_as_0118 PDF set, member #1, version 1; LHAPDF ID = 303401
NNPDF31_nlo_as_0118 Initialised with 1 members and no errorType.
fish: “./exe” terminated by signal SIGSEGV (Address boundary error
I'll try to see where exactly.