On Thu, Jul 28, 2022 at 11:43 AM Ilya Maximets <[email protected]> wrote: > > SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior in > lib/dpif-netlink.c:1077:40: runtime error: > left shift of 1 by 31 places cannot be represented in type 'int' > > #0 0x73fc31 in dpif_netlink_port_add_compat lib/dpif-netlink.c:1077:40 > #1 0x73fc31 in dpif_netlink_port_add lib/dpif-netlink.c:1132:17 > #2 0x2c1745 in dpif_port_add lib/dpif.c:597:13 > #3 0x07b279 in port_add ofproto/ofproto-dpif.c:3957:17 > #4 0x01b209 in ofproto_port_add ofproto/ofproto.c:2124:13 > #5 0xfdbfce in iface_do_create vswitchd/bridge.c:2066:13 > #6 0xfdbfce in iface_create vswitchd/bridge.c:2109:13 > #7 0xfdbfce in bridge_add_ports__ vswitchd/bridge.c:1173:21 > #8 0xfb5319 in bridge_add_ports vswitchd/bridge.c:1189:5 > #9 0xfb5319 in bridge_reconfigure vswitchd/bridge.c:901:9 > #10 0xfae0f9 in bridge_run vswitchd/bridge.c:3334:9 > #11 0xfe67dd in main vswitchd/ovs-vswitchd.c:129:9 > #12 0x4b6d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f) > #13 0x4b6e3f in __libc_start_main > (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) > #14 0x562594eed024 in _start (vswitchd/ovs-vswitchd+0x787024) > > Fixes: 526df7d8543f ("tunnel: Provide framework for tunnel extensions for > VXLAN-GBP and others") > Signed-off-by: Ilya Maximets <[email protected]>
Acked-by: Mike Pattrick <[email protected]> > --- > lib/dpif-netlink.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c > index a498d5667..89e1d4325 100644 > --- a/lib/dpif-netlink.c > +++ b/lib/dpif-netlink.c > @@ -1074,7 +1074,7 @@ dpif_netlink_port_add_compat(struct dpif_netlink *dpif, > struct netdev *netdev, > > ext_ofs = nl_msg_start_nested(&options, > OVS_TUNNEL_ATTR_EXTENSION); > for (i = 0; i < 32; i++) { > - if (tnl_cfg->exts & (1 << i)) { > + if (tnl_cfg->exts & (UINT32_C(1) << i)) { > nl_msg_put_flag(&options, i); > } > } > -- > 2.34.3 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
