I don’t think they will accidentally become like a human and start acting out of babylike violent paranoid self-interest, as is the typical sci-fi plot. However we are already building machines with electronics that are screwing with ourselves in annoying and somewhat unpredicted ways, and creating semi-dependency in tasks we used to handle for ourselves.
For instance, GPS devices in cars instead of knowing how to read a map and navigate ourselves.
Or, cars which refuse to turn off their headlights, ever (though that’s simple electronics and moronic design).
Or cars which want to handle road conditions and/or parking for you, or to adjust your seat based on the key you are using (which automatically flattens something you’ve left under the seat).
Or airplanes which can’t stay in the air unless a computer is adjusting the shape of their wings.
There are already armed remote-controlled military vehicles for land, sea and air. Those will probably get more and more automated and computerized, and will no doubt accidentally kill humans. (Surely they already have, if you count drones and cruise missiles. A cruise missile almost fits the model – just instead of being obsessed with its own survival or world domination, it’s obsessed with contour hugging and reaching it’s programmed coordinates.)