1

I have a program witch is a xmpp client that connect to a server. I use gloox library to do that. When I run the program, it runs ok and connects to the server.

But when I run it under valgrind, the program never sends

<iq id='uid:4efa1893:327b23c6' type='set' from='user@server/ressource' xmlns='jabber:client'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></iq>

to the server.

Had anybody experience such problem?

Are there any parameter I specially need to run valgrind with to make sure that it is the same environement as a normal program execution?

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
ruddy
  • 135
  • 4
  • 12
  • Um... I think you misunderstand Valgrind. The purpose of that program is to break programs which have errors in them that might otherwise be missed. It sounds like it's working. – BRPocock Dec 28 '11 at 03:49

1 Answers1

2

The very first question is: did Valgrind report any errors in the execution of your program?

If your program is well-defined, and Valgrind didn't report any errors in it, then the program is supposed to behave exactly the same way under Valgrind as without it (only slower); no special settings required.

It is somewhat more likely that Valgrind did report some errors, and if so, your program is likely not well-defined, in which case your question is mute -- your program doesn't work the same because it is not well-defined (i.e. depends on undefined behavior).

Employed Russian
  • 199,314
  • 34
  • 295
  • 362