Closed GoogleCodeExporter closed 9 years ago
Original comment by zhanyong...@gmail.com
on 29 Oct 2009 at 4:04
FYI, just spent an hour debugging my test to figure out this was the culprit...
would
be nice to fix it...
Original comment by mi...@google.com
on 31 Mar 2010 at 7:47
Issue 109 has been merged into this issue.
Original comment by vladlosev
on 3 May 2010 at 3:35
Issue 114 has been merged into this issue.
Original comment by w...@google.com
on 2 Jun 2010 at 7:59
Original comment by w...@google.com
on 27 Sep 2010 at 9:31
The workaround comment is very useful:
http://code.google.com/p/googlemock/issues/detail?id=114#makechanges
Original comment by zilvinas...@gmail.com
on 25 Oct 2010 at 1:19
I'm upvote this if it was possible
Original comment by atomicpi...@gmail.com
on 23 Jun 2011 at 1:41
Indeed, this is the biggest issue my company has in using Google Mock.
Original comment by ben.med...@gmail.com
on 23 Jun 2011 at 3:46
Hi,
Deadlock occurs in FunctionMockerBase<F>::VerifyAndClearExpectationsLocked
which is being called in destructor of mock.
Expectations vector is being cleared under protection of mutex, so if any
expectation contains Mock as an argument / return value it deadlocks.
I've attached proposed patch for version 1.5.0 but don't know if it is correct
in terms of threadology.
How it works:
We create temporary expectations vector, swap original one with it, unlock,
clear temporary (thus no deadlock in destructor) and lock again.
Kudos to William Manley for help with finding source of problem and proposing
swap trick as solution.
Original comment by shax...@gmail.com
on 30 Jun 2011 at 3:46
Attachments:
Thanks for the patch - it does indeed seem to fix the problem.
But in order to accept the patch, we must ask you to sign the CLA, as outlined
in http://code.google.com/p/googlemock/wiki/DevGuide#Contributing_Code. Let me
know when you do that and I will merge the patch.
Original comment by vladlosev
on 11 Jul 2011 at 9:53
Has this patch been merged into the project?
Thanks.
Original comment by robmccul...@gmail.com
on 26 Jul 2011 at 1:03
Hello,
What's the status of this bug ? It's really anoying ..
Thanks.
Original comment by leonard....@gmail.com
on 24 Sep 2011 at 11:02
Hi,
If it is blocker for you it is still possible to apply patch on your local
codebase.
Regards,
Z
Original comment by shax...@gmail.com
on 25 Sep 2011 at 12:50
Hi,
above patch is not applicable with gmock-1.6.0 due to some code reorganization.
Thus I've slightly adapted the patch.
Could someone merge without bureaucracy or fix it in some other way in the
upstream code, please?
Regards
Original comment by hyuek...@astaro.com
on 12 Oct 2011 at 10:58
Attachments:
I've implemented my own fix, with a unit test:
http://codereview.appspot.com/5267041/
I'm a Google employee, so I believe I don't need to sign the CLA.
Original comment by jaco...@google.com
on 13 Oct 2011 at 2:32
Hello,
I was contacted by maintainer shortly after submitting patch and signed CLA. It
just waits for merging into repo.
Original comment by shax...@gmail.com
on 13 Oct 2011 at 4:04
Fixed in revision 403. Thanks to Aaron Jacobs for the fix!
Original comment by vladlosev
on 24 Oct 2011 at 11:42
This problem occurs in current version if you return a casted shared_ptr
Return(std::tr1::dynamic_pointer_cast<IObjectA>(SharedPtrObject))
Original comment by psp...@gmail.com
on 4 Sep 2012 at 12:13
This appears to be a different, even if a related problem. If you want to, file
a new issue for it. Don't forget o provide short but complete program that
reproduces it and details about your compiler and OS.
Original comment by vladlosev
on 5 Sep 2012 at 8:25
Original issue reported on code.google.com by
zhanyong...@gmail.com
on 29 Sep 2009 at 4:26