[ovs-dev] [PATCH] monitor: Fix improper use of stubs.

Simon Horman horms at verge.net.au
Fri Oct 11 04:47:02 UTC 2013


Hi Ethan,

I have investigated slightly further and it seems that the problem
does not manifest when compiling with clang but does manifest
when compiling with gcc.

# clang --version
Debian clang version 3.4-1~exp1 (trunk) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix

# cc --version
gcc (Debian 4.8.1-9) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

On Thu, Oct 10, 2013 at 09:07:59PM -0700, Ethan Jackson wrote:
> Looking into it, should have checked before merging.
> 
> Ethan
> 
> On Thu, Oct 10, 2013 at 9:05 PM, Simon Horman <horms at verge.net.au> wrote:
> > Curiously, making the stub non-static seems to break
> > at least the first two tests of the test-suite.
> > I assume its exposing a bug but I haven't investigated further.
> >
> > On Thu, Oct 10, 2013 at 06:18:17PM -0700, Ethan Jackson wrote:
> >> Oops didn't notice that it was.  I'll change it before merging.
> >>
> >> Ethan
> >>
> >> On Thu, Oct 10, 2013 at 6:02 PM, Ben Pfaff <blp at nicira.com> wrote:
> >> > On Thu, Oct 10, 2013 at 05:57:51PM -0700, Ethan Jackson wrote:
> >> >> Stubs must be uninitialized when used in case they allocate memory.
> >> >>
> >> >> Signed-off-by: Ethan Jackson <ethan at nicira.com>
> >> >
> >> > Also, stubs shouldn't ordinarily be static, any particular reason the
> >> > one here is?
> >> >
> >> > Acked-by: Ben Pfaff <blp at nicira.com>
> >> >
> >> _______________________________________________
> >> dev mailing list
> >> dev at openvswitch.org
> >> http://openvswitch.org/mailman/listinfo/dev
> >>
> 



More information about the dev mailing list