Mach7 icon indicating copy to clipboard operation
Mach7 copied to clipboard

[Segfault] when binding `var<vector<type *>>` to class member of the same type

Open forflo opened this issue 9 years ago • 1 comments

Env: clang++ with clang++ --version:

clang version 3.8.0 (tags/RELEASE_380/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/sbin

Description

This code produces the error

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6121d54 in __memmove_ssse3_back () from /usr/lib/libc.so.6

at this line. As you can see params is an instance of the var template which I'm trying to fill with a copy of the member argv_ of the ExpFunc object. The type of argv is vector<Expression*> and argv_ is stored as non-pointer, non-reference in ExpFunc. params was instanciated as follows:

var<vector<Expresson *>> params;

You can find the whole test here. I deleted most of the other unit tests and the respective include files in order to make sure that the error arises from a use of Mach7.

forflo avatar Aug 24 '16 11:08 forflo

Hi Florian, Your code still contains parts of your library, which makes it harder for me to reproduce it locally. Would it be possible for you to extract a repro from your example that depends only on Mach7 and perhaps some standard libraries? Thank you!

solodon4 avatar Aug 29 '16 07:08 solodon4