http://bugs.meego.com/show_bug.cgi?id=1007
--- Comment #10 from pohly <[email protected]> 2010-05-26 08:43:31 PDT --- (In reply to comment #4) > There are many cases reporting 'conditional jump or move depends on > uninitialised value(s)' in synthesis library. The reason is to read a variable > value without initialization. For the detail valgrind output, please see > http://zys.sh.intel.com/valgrind-synthesis-conditional.txt > > synthesis library has many cases of this kind. A typical case is like this: > class base { > public: > virtual bool xxx() { return false; } > }; > class A : public { > bool m_flag1; > bool m_flag2; > public: > A() > { > if( IS_CLIENT) { // current engine is a client > #ifdef SYSYNC_CLIENT > m_flag1 = true; > #endif > } else { > #ifdef SYSYNC_SERVER > m_flag2 = true; > #endif > } > } > #ifdef SYSYNC_SERVER > bool xxx() { return m_flag2; } > #endif > }; > > void errorFunc(A* a) { > if(a->xxx()) { > // do sth > } > } > > This case will report an the above error. The root cause is because we enable > sync client and server at the same time. When we create A object in client > engine, then errorFunc will actually call A::xxx() instead of base::xxx(). > Because A constructor doesn't initialise m_flag2 in client mode, this kind of > error occurs. Please see libsynthesis/src/sysync/syncagent.cpp:635. > Many of errors are due to this kind of code. I don't know whether there are > other places in synthesis. but i think possbily. What fix do you recommend? Initialize m_flag2 outside of the if/else branches? I assume m_flag2 maps to fUseRespURI in the example above? -- Configure bugmail: http://bugs.meego.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching someone on the CC list of the bug. _______________________________________________ Syncevolution-issues mailing list [email protected] http://lists.syncevolution.org/listinfo/syncevolution-issues
