[ovs-dev] [PATCH] ovs-thread: Break recursion for coverage counters.

Gurucharan Shetty shettyg at nicira.com
Fri Dec 13 18:11:41 UTC 2013


On Fri, Dec 13, 2013 at 9:43 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Wed, Dec 11, 2013 at 04:11:24PM -0800, Gurucharan Shetty wrote:
>> For systems that do not use linker sections and also do not
>> have either HAVE_THREAD_LOCAL or HAVE___THREAD (ex: windows
>> using MSVC), a COVERAGE_INC() calls xmalloc which inturn calls
>> COVERAGE_INC() creating a recursion that causes a stack overflow.
>
> Is it still necessary?  I just applied some changes that eliminate
> differences between systems.

It is still necessary. But instead of changing xmalloc->malloc inside
DEFINE_EXTERN_PER_THREAD_DATA, I will have to change the xmalloc in
DEFINE_STATIC_PER_THREAD_DATA. Do you think I should change
xmalloc->malloc at both the places (to avoid future inconsistencies)?



>
> If it is still necessary:
> Acked-by: Ben Pfaff <blp at nicira.com>



More information about the dev mailing list