Re: [DynInst_API:] Concurrent calls to getInsns


Date: Mon, 24 Jul 2017 17:40:46 +0000
From: Bill Williams <bill@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] Concurrent calls to getInsns
This is an area with some active work occurring. However, it is best to assume that interfaces are thread-unsafe in the current releases and require external locking.

If you need guidance on how best to manage concurrent access to Dyninst data in the meantime, let us know; the proper strategy depends to some extent on your use case.

--bw

________________________________________
From: Dyninst-api <dyninst-api-bounces@xxxxxxxxxxx> on behalf of Thomas Dullien <thomasdullien@xxxxxxxxxx>
Sent: Monday, July 24, 2017 5:16 AM
To: dyninst-api
Subject: [DynInst_API:] Concurrent calls to getInsns

Hey there,

I am observing data races and inconsistent results when multiple
threads run through the following code:

Dyninst::ParseAPI::Block::Insns block_instructions;
block->getInsns(block_instructions);
for (const auto& instruction : block_instructions) { .... }

Are Dyninst functions thread-unsafe by default, or what is the best way of
finding out which ones are safe and which ones aren't ? :-)

Cheers,
Thomas
PS: Thanks for the awesome tool ! :)
[← Prev in Thread] Current Thread [Next in Thread→]