Re: [Mesa-dev] [PATCH v2 1/2] virgl: Fix a strict-aliasing violation in the encoder

2016-12-12 Thread Emil Velikov
On 8 December 2016 at 00:03, Edward O'Callaghan wrote: > On 12/08/2016 02:53 AM, Emil Velikov wrote: >> On 6 December 2016 at 22:34, Edward O'Callaghan >> wrote: >>> On 12/07/2016 12:36 AM, Emil Velikov wrote: On 6 December 2016 at

Re: [Mesa-dev] [PATCH v2 1/2] virgl: Fix a strict-aliasing violation in the encoder

2016-12-07 Thread Edward O'Callaghan
On 12/08/2016 02:53 AM, Emil Velikov wrote: > On 6 December 2016 at 22:34, Edward O'Callaghan > wrote: >> On 12/07/2016 12:36 AM, Emil Velikov wrote: >>> On 6 December 2016 at 11:30, Edward O'Callaghan >>> wrote: As per the C spec,

Re: [Mesa-dev] [PATCH v2 1/2] virgl: Fix a strict-aliasing violation in the encoder

2016-12-07 Thread Emil Velikov
On 6 December 2016 at 22:34, Edward O'Callaghan wrote: > On 12/07/2016 12:36 AM, Emil Velikov wrote: >> On 6 December 2016 at 11:30, Edward O'Callaghan >> wrote: >>> As per the C spec, it is illegal to alias pointers to different >>>

Re: [Mesa-dev] [PATCH v2 1/2] virgl: Fix a strict-aliasing violation in the encoder

2016-12-06 Thread Dave Airlie
On 7 December 2016 at 08:34, Edward O'Callaghan wrote: > > > On 12/07/2016 12:36 AM, Emil Velikov wrote: >> On 6 December 2016 at 11:30, Edward O'Callaghan >> wrote: >>> As per the C spec, it is illegal to alias pointers to different >>>

Re: [Mesa-dev] [PATCH v2 1/2] virgl: Fix a strict-aliasing violation in the encoder

2016-12-06 Thread Edward O'Callaghan
On 12/07/2016 12:36 AM, Emil Velikov wrote: > On 6 December 2016 at 11:30, Edward O'Callaghan > wrote: >> As per the C spec, it is illegal to alias pointers to different >> types. This results in undefined behaviour after optimization >> passes, resulting in very

Re: [Mesa-dev] [PATCH v2 1/2] virgl: Fix a strict-aliasing violation in the encoder

2016-12-06 Thread Emil Velikov
On 6 December 2016 at 11:30, Edward O'Callaghan wrote: > As per the C spec, it is illegal to alias pointers to different > types. This results in undefined behaviour after optimization > passes, resulting in very subtle bugs that happen only on a > full moon.. > > Use

Re: [Mesa-dev] [PATCH v2 1/2] virgl: Fix a strict-aliasing violation in the encoder

2016-12-06 Thread Eric Engestrom
On Tuesday, 2016-12-06 22:56:54 +1100, Edward O'Callaghan wrote: > > > On 12/06/2016 10:48 PM, Eric Engestrom wrote: > > On Tuesday, 2016-12-06 22:30:58 +1100, Edward O'Callaghan wrote: > >> As per the C spec, it is illegal to alias pointers to different > >> types. This results in undefined

Re: [Mesa-dev] [PATCH v2 1/2] virgl: Fix a strict-aliasing violation in the encoder

2016-12-06 Thread Edward O'Callaghan
On 12/06/2016 10:48 PM, Eric Engestrom wrote: > On Tuesday, 2016-12-06 22:30:58 +1100, Edward O'Callaghan wrote: >> As per the C spec, it is illegal to alias pointers to different >> types. This results in undefined behaviour after optimization >> passes, resulting in very subtle bugs that

Re: [Mesa-dev] [PATCH v2 1/2] virgl: Fix a strict-aliasing violation in the encoder

2016-12-06 Thread Eric Engestrom
On Tuesday, 2016-12-06 22:30:58 +1100, Edward O'Callaghan wrote: > As per the C spec, it is illegal to alias pointers to different > types. This results in undefined behaviour after optimization > passes, resulting in very subtle bugs that happen only on a > full moon.. > > Use a memcpy() as a