Guillaume Munch wrote:

> The choice is simple, because just adding a new variable member to math
> insets as per the attached (trivial) .diff leads to new segfaults with
> math macros. The .diff must be applied to current master (before or
> after my upcoming TexRow patches). Compiler is g++ 4.9.2 in C++11 mode
> (I did not try with C++98). Then open the attached segv-math-demo.lyx,
> select all and hold Ctrl+C until it crashes (not more than a few seconds).

This makes me a bit nervous (not because of your changes of course).

> The crash does not occur if we only apply the diff on InsetMath.h, i.e.
> if we change the structure of the class but leave the new member
> uninitialized. (An ironic twist on the g++-5 crash-on-copy bug which
> occurs when some variables are not initialized that I saw passing on the
> list, if you want.)

Incidentally this bug was fixed last week: 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67557. Therefore we should try 
this with a fixed gcc. I would very much appreciate it if you have the time 
to do so, if not I am going to do that but this may take a week or two.

> So it seems in that mathed/ is in a brittle state. This is a deeper
> reason for just using pointers for now. This seems serious. Or did
> I miss something obvious to C++ experts?

I don't think so. If we are lucky then it is not mathed that is in a brittle 
state, but gcc in C++11 mode, and in that case we should warn users not to 
use C++11 mode with current gcc.


Georg


Reply via email to