As I posted elsewhere - a .357 Mag revolver gives you piece of mind!
For bear? Apart from the local laws -- walking around with that could get me arrested quite quickly unless I had a good reason -- that is not what I would pick (I would prefer a pump action shotgun with slugs for that job). Also the risk is remote, almost all bears here will do their best to avoid people. I'd guess that a larger percentage of people than bears would attack me with no provocation. If I was really worried about them I'd start using a 180 cm oak bo -- a quarterstaff -- as a hiking pole: a proper spear would probably be illegal.
Now, gutting a moose in a dense woods knowing that the smell will attract a large scavenger -- i.e. bear -- was a wee bit concerning. Fortunately me singing -- mostly old Tom Lehrer songs, IIRC -- can repel any known creature so I had a surefire way to keep them away. :-D