[llvm-dev] Purpose of Epoch Trackers

Praveen Velliengiri via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 21 06:27:23 PDT 2019


Hi all,
I'm dealing with the multi-threaded code, in one of executions of the
program I hitting an assertion failure, I'm not always getting the
assertion failure when I run the executable but it occurs for say (1 in 10)
times. I think there may be an thread race condition. I don't know which is
the root cause of this error because the assertion not explicitly occurs in
my code, it occurs in the library code which I'm using in my threads.

Assertion I'm getting is this:
 Global Value is CRO:
/home/preejackie/spicy/orcs/llvm/include/llvm/ADT/DenseMap.h:1242: bool
llvm::DenseMapIterator<const llvm::Value *,
llvm::StringMapEntry<llvm::Value *> *, llvm::DenseMapInfo<const llvm::Value
*>, llvm::detail::DenseMapPair<const llvm::Value *,
llvm::StringMapEntry<llvm::Value *> *>, false>::operator!=(const
llvm::DenseMapIterator::ConstIterator &) const [KeyT = const llvm::Value *,
ValueT = llvm::StringMapEntry<llvm::Value *> *, KeyInfoT =
llvm::DenseMapInfo<const llvm::Value *>, Bucket =
llvm::detail::DenseMapPair<const llvm::Value *,
llvm::StringMapEntry<llvm::Value *> *>, IsConst = false]: Assertion `(!Ptr
|| isHandleInSync()) && "handle not in sync!"' failed.

It seems like the given assertion is defined in Epochtracker.h only for the
debug build. My question is what is the purpose of Epochtrackers,h? Is it
there to catch the race condition when accessing the densemap concurrently ?

Please tell me if you need more info
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190621/cdffbffa/attachment.html>


More information about the llvm-dev mailing list