Closed facetothefate closed 7 years ago
Hello ~~ Are there anyone ?
Oops, somehow it skipped my busy to-do list. Taking a look right now.
On Fri, Sep 30, 2016 at 11:58 PM, Zhifei Fang notifications@github.com wrote:
Hello ~~ Are there anyone ?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eranpeer/FakeIt/pull/72#issuecomment-250850632, or mute the thread https://github.com/notifications/unsubscribe-auth/ACc8gn_C-rLMRqV1vIAcee5j8_Nc6ZYdks5qvXf1gaJpZM4J4SmR .
Eran 972-52-8387550
I push the single header versions with your fix. All single header files can be used now.
On Sat, Oct 1, 2016 at 6:35 AM, Eran Pe'er eranpe@gmail.com wrote:
Oops, somehow it skipped my busy to-do list. Taking a look right now.
On Fri, Sep 30, 2016 at 11:58 PM, Zhifei Fang notifications@github.com wrote:
Hello ~~ Are there anyone ?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eranpeer/FakeIt/pull/72#issuecomment-250850632, or mute the thread https://github.com/notifications/unsubscribe-auth/ACc8gn_C-rLMRqV1vIAcee5j8_Nc6ZYdks5qvXf1gaJpZM4J4SmR .
Eran 972-52-8387550
Eran 972-52-8387550
I wonder why we don't reinit the offset vector here ?
I got a segmentation fault today, in my test, I have a big struct contains a lot of the virtual method, called mock_a I have two different test class, one setting up some functions of mock_a, the other one firstly reset the mock_a, and setting up some more functions, then I ran into a segmentation fault.
I trace back, it turns out the offset vector contains the old offset which are added in the previous test class. I think this happened because the two offset have same id.
however with _methodMocks have been reset, the old offset will provide a NULL pointer. Then I have a segmentation fault.
BTW, why we need to keep track all the offsets ? Why we don't make the whole _methodMocks as a map (id as the key)?