On Mon, Jun 12, 2017 at 07:36:48PM -0400, Lance Richardson wrote:
>
>
> - Original Message -
> > From: "Greg Rose"
> > To: "Lance Richardson"
> > Cc: d...@openvswitch.org
> > Sent: Monday, 12 June, 2017 6:44:43 PM
> > Subjec
On 06/12/2017 04:36 PM, Lance Richardson wrote:
- Original Message -
> From: "Greg Rose"
> To: "Lance Richardson"
> Cc: d...@openvswitch.org
> Sent: Monday, 12 June, 2017 6:44:43 PM
> Subject: Re: [ovs-dev] [PATCH] byte-order: avoid left shifts with
- Original Message -
> From: "Greg Rose"
> To: "Lance Richardson"
> Cc: d...@openvswitch.org
> Sent: Monday, 12 June, 2017 6:44:43 PM
> Subject: Re: [ovs-dev] [PATCH] byte-order: avoid left shifts with
> unrepresentable results
>
> On
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.
Fo
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.
Signe