It could well be that you are right that it is in the conversion to base 10, but I don't see how your example proves it. The problem is that the heap could be getting corrupt, and that can cause a seg-fault arbitrarily later or not at all.