Segfault generated by gcc-7

Markus Trippelsdorf markus@trippelsdorf.de
Tue Aug 29 10:39:00 GMT 2017


On 2017.08.29 at 12:31 +0200, Marco Varlese wrote:
> Hi,
> 
> I got a SEGFAULT in my program when compiling it with gcc-7 but it
> is/was all good when using gcc-6.
> 
> The SEGFAULT happens due to the line below:
> d_point = *p;
> 
> And a fix for it (with gcc-7) has been:
> memcpy(&d_point, 
> 	p, 
> 	sizeof(d_point));
> 
> Does this make any sense to anybody?

No. Please open a bug and attach the full program that causes the crash.
Otherwise the issue is impossible to debug.

-- 
Markus



More information about the Gcc mailing list