Sent: Monday, 12 June, 2017 6:44:43 PM
> > Subject: Re: [ovs-dev] [PATCH] byte-order: avoid left shifts with
> > unrepresentable results
> >
> > On 06/12/2017 01:13 PM, Lance Richardson wrote:
> > > A left shift that would produce a result that is not representa
On 06/12/2017 04:36 PM, Lance Richardson wrote:
- Original Message -
> From: "Greg Rose" <gvrose8...@gmail.com>
> To: "Lance Richardson" <lrich...@redhat.com>
> Cc: d...@openvswitch.org
> Sent: Monday, 12 June, 2017 6:44:43 PM
> Subjec
- Original Message -
> From: "Greg Rose" <gvrose8...@gmail.com>
> To: "Lance Richardson" <lrich...@redhat.com>
> Cc: d...@openvswitch.org
> Sent: Monday, 12 June, 2017 6:44:43 PM
> Subject: Re: [ovs-dev] [PATCH] byte-order: avoid left shift
On 06/12/2017 01:13 PM, Lance Richardson wrote:
A left shift that would produce a result that is not representable
by the type of the expression's result has "undefined behavior"
according to the C language standard. Avoid this by casting values
that could set the upper bit to unsigned types.
A left shift that would produce a result that is not representable
by the type of the expression's result has "undefined behavior"
according to the C language standard. Avoid this by casting values
that could set the upper bit to unsigned types.
Found via gcc's undefined behavior sanitizer.