http://www.bonappetit.com/test-kitchen/ingredients/slideshow/foods-that-can-kill-you Which I think may be overstating the danger, but, their claim is:
After some quick Googling, we found that hydrogen cyanide is lethal at about 1.52 milligrams per kilogram, meaning that it takes little more than 0.1 grams (a dime weighs about one gram) of the toxin to dispatch a 150-pound human. A single cherry yields roughly 0.17 grams of lethal cyanide per gram of seed, so depending on the size of the kernel, ingesting just one or two freshly crushed pits can lead to death.
Again, I think that may be overstated, but should still give you cause to avoid the risk. The pits do not actually contain cyanide, but do contain a related compound that digest in the body into cyanide. Incidental swallowing of a pit is not the issue, it is the kernel which has the compounds.
The earlier comment regarding flavor: These chemicals tend to be a very bitter flavor, one that people tend to dislike. This tends to act as a warning "not good" causing us not to eat such things because we do not like the flavor and thus note poisoning ourselves. Not foolproof, but it helps. A few in a batch may not actually hurt you unless you ate entire jars in one sitting, but that does not mean it will be good for you, and the bitterness may well effect the flavor. My experience, though anecdotal, with stone fruits is that more pits will split and crack after heating than before so the risks of off flavor or even tainting may increase.
If this is something you wish to make in quantity or more than once, I would look into investing in of of the small pitters available for home use.