As somebody already pointed out, probably nobody who's posted to so far have ever shot a charging bear with a handgun (or maybe even a rifle).
Even a .500 S&W isn't a "stopping" cartridge on big bears.
The one guy I know who killed a close-range, charging 9-foot brown bear with a handgun used 7-shot 9mm S&W auto. He said he'd had preferred his S&W Mountain Gun .44 Magnum, but the 9mm was what he had on him during a fishing trip. (Google Phil Shoemaker., 9mm, brown bear....)
Phils killed a number of charging brown bear with rifles, and would much rather have one of his .30-06's than ANY handgun.
I think Phil's experience and opinion pretty much settle that part of the discussion.