I don't understand ...
You said the code was supposed to "sum two numbers".
So let <a> be 2, and <b> be 3,
Now you add the two, obviously you should get 5 rather than 6.
Except if you meant to multiply ...
You probably didn't have a base case in whatever you were doing (I don't how you can add 2 numbers using recursion, 3 or more I can understand). No base case means infinite recursion, means stack overflow, means segmentation fault.