Stomach produces a gastric acid that helps to break down food components. And this gastric acid contains hydrochloric acid and its pH level is in the range of 1-2 which is strong enough to destroy a wooden piece. So how does stomach prevents from digesting itself? It’s the bicarbonate, an alkaline, that is produced to neutralize the acid in stomach. In fact, this alkaline prevents stomach from digesting itself.
If the gastric acid is over produced due to bacterial infection or improper supply of blood to stomach, it could lead to gastric ulcer and usage of drugs like ibuprofen and aspirin could worsen or cause ulcers. If the ulcers are minor, it can be treated with antacids that neutralize the stomach acidity.