Airbus fly-by-wire aircraft have what is called envelope protection which is to prevent pilot inputs from exceeding structural limits as well as keep them from getting the aircraft into an upset flight regime (stall, overbank, etc.). The philosophy behind it is that, if the pilots need to perform an extreme maneuver they can be as aggressive with the controls as they want, confident that they won't break the plane.
Boeing generally disagrees with this approach saying that, in an emergency, the pilot needs to have all possible force at his disposal, even if it breaks the plane. See the question Federico linked to in comments for more on this.
Of course, the Airbus system can only provide these protections when systems are all functioning properly. If part of the system is not working the protections are removed. Examples: AF447, XL Airways 888T, Indonesia AirAsia 8501,
As far as AA587, the A-300 is not a fly-by-wire aircraft and doesn't have envelope protections. It's debatable, though, if envelope protection would have helped in that situation. None of the rudder inputs by itself was outside of the structural limitations of the aircraft so the computer would probably not have prevented them. The failure was due to the pilot making alternating inputs in quick succession which caused the sideslip angle to build up to twice the certified design strength of the vertical stabilizer. The A300 system was designed to limit the rudder travel available as speed increased, which is probably fairly similar to what the fly-by-wire computer is programed to do in other Airbus planes. But it would be difficult to determine what complex combinations of inputs might exceed the limits and prevent them.