On quarta-feira, 14 de junho de 2017 04:04:54 PDT Jay Sharma wrote: > Hi Phill, > > Thanks for reply. > In issue I reported as I mentioned in the note not only related to RE > service. It is general issue of mocking in Ubuntu 16-04 64-bit machine. > I tried in some of the other test cases not RE where mocking is being used, > removing the print statements, it also results in crash. > > I thought may be Ubuntu internal changes or mocking framework support for > Ubuntu 16.04 [64-bit], not sure what is making the difference.
Not necessarily. Adding/removing unrelated statements causing a crash to disappear means it's a heisenbug. That could be a compiler bug or a harness issue, but it's actually far more likely that you've got buffer overflows somewhere in your code and you're trashing memory. The presence of the unrelated statement causes the variables in the stack to be rearranged, just as an unrelated printf call may cause memory allocations and deallocations, which may make the problem disappear for a while. I suggest first trying to debug the issue using Valgrind. It's not always able to detect stack-based problems, but if the problem is in the heap, Valgrind will find it. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
