When my oldest was a baby, I routinely did this. Like others have said, our infant seat "locked" onto the cart and had to be released as from its base in order to remove it. Because he was the *only* child I was responsible for at the time, I was always right with him/the cart and I felt (and feel) comfortable that the risk of the cart suddenly tipping over was minimal (almost non-existent, really).
Now that I have three children--a 4.5-year-old, and almost-3-year-old, and a newborn--I would absolutely not do this. My older two sometimes climb onto the outside of the cart (to ride on it) and, of course, have no concept of the physics involved--especially when they grab onto the side of the cart. Also, my kids are generally really good about staying close to me when we're out, but my 2.5-year-old is not completely above wandering/running off--so I know there is the possibility that I might have to abandon my cart in order to follow her or redirect her.
Generally, I wear the newborn, put the 2.5-year-old in the cart, and let the 4.5-year-old walk.
This reminds me, though--a little over a year ago, we were in an REI store and I had my daughter (then 1.5-years) in the cart (in the seat of the cart) and my son (then 3.5) was walking. He came up and stepped up onto the side of the cart, and the whole thing tipped. If it hadn't been for my husband's very quick reflexes, the cart would have tipped over on top of my son, with my daughter inside--I'm quite sure both would have been injured. So the concern isn't limited to infants in infant seats.
In my experience, grocery store carts are usually larger, with a wider wheel base, and tend to be more stable. But smaller, narrower carts (like the one at REI) tend to be considerably more "tippy."