Well don't know how many of the people responding here actually live in or by areas with a bear population but someone has to understand something, first very few bears will actually attack one or more people unless it is a sow or young bear and even then it is rare.
Second bears most will just charge and and stop or turn away.
Third if you need to shoot you will not require many shots because even if you maintain your nerve you will have very little or no time to get a shot off!
If you need to get a shot in it needs to break things like shoulders and so forth. Forget about semi autos, forget about magazines, just keep it simple and deadly. If there is a bit of bush between you and the bear and you have a high velocity fragmenting round good luck it will just explode and not do much to the bear, that is where a 30-30, 45 LC, .44 mag, .444, or 45-70 will do better.
Time and time again it has been reported that a large frontal slow moving round are the most effective! You need to punch into the threat and break it up and dump a s much energy as possible. Lately small lever actions in 44/45 have become popular but have you ever tried to shoulder one and get a decent cheek weld?
So after decades of spending time in the bush and never having to discharge a weapon for self preservation guess what I use as my trunk, hiking, camping gun, yup a 12 gauge!!!!
I have packed .308, a 7.62X39, 870s, Ithacas, Mossbergs, and after a few years of shooting my Chinese 12.5" Grizzly pump with ghostrings, picatinny aluminum forearm, triangle front grip,and reduced LOP (length of pull) syn overmould buttstock I know it is dependable.
It ain't pretty, but is tough and with those ghostrings I can put a world of heavy lead hurt in the boilermaker whenever I want.
The 20mm rails allows for a powerful LED light to be slid on if needed and the tri front grip ensures that I have a firm grip for the pump action as I have been told if you are charged by a bear you will sh_t yourself.
Rememeber a 12 gauge is a friggin big hunk of lead and in 3" magnum nothing short of an armoured car is going to be able to shrug a hit off.
Randy