[lttng-dev] Setenv/getenv are not thread-safe; whose bug is it?

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Mon Mar 13 01:12:30 UTC 2017


----- On Mar 12, 2017, at 8:21 PM, Douglas Graham douglas.graham at ericsson.com wrote:

>> Thanks a lot for the very thorough but report!
>> I just prepared a patch for you sent in a separate thread:
>> "[PATCH lttng-ust] Fix: race between lttng-ust getenv() and application
>> setenv()"
>> Can you give it a try and let me know if it fixes things on your side ?
> 
> Thanks for the quick turnaround Mathieu!
> 
> I don't know how we build lttng but I have passed this information along to the
> team that does, asking that they provide me a library with this patch applied
> for us to test.  I'll let you know how it looks when we get there.

FYI, this patch is now in lttng-ust master branch, and the following
patch fixes a warning introduced by my initial patch:

commit 92ce256da4da1586465e18362e88b5be16752d59
Author: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
Date:   Sat Mar 11 21:18:27 2017 -0500

    Fix: add missing getenv.h include to ustctl.c
    
    Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>

Thanks,

Mathieu


> 
> Regards,
> Doug

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list