You hit the fast food drive-through a couple times a week, and your grocery cart is regularly filled with cookies, packaged doughnuts, ice cream, chips (and dip). But you’re thin. You run—a lot—and you’re not gaining any weight, so all’s good, right? Well, not exactly. Put down the chocolate cupcake and hear us out.

While runners do tend to be much healthier than the general population, with lower rates of diabetes and heart disease, that’s largely due to a healthy diet rather than running regularly, says Sara Mahoney, Ph.D., chair of the department of exercise science at Bellarmine University. In general, because runners run, they take care of their bodies by also eating well and resting.

But not all of them. Some of them—and we all know one—subsist on doughnuts and burgers. In the short term, running can mitigate the negative health effects of that lifestyle. But over decades, exercise loses its protective abilities.

As a runner, I just felt that if the furnace was hot enough, it would burn whatever you put in.

Longtime Boston Marathon director Dave McGillivray, 63, learned this the hard way. McGillivray, who’s run the Boston course every year since 1973, logged 90 to 120 miles a week in his heyday, and every year on his birthday he runs his age in miles.

Four years ago, however, McGillivray began feeling short of breath at the start of workouts. An angiogram revealed he had severe coronary artery disease. “Wait a minute,” McGillivray said. “I’ve been running all my life. I’ve done eight Ironman Triathlons and 140 marathons. I’ve run across the United States. How can I have blocked arteries?”

McGillivray has a family history of chronic cardiac illness, and he had also been eating like a teenager for most of his life. “As a runner, I just felt that if the furnace was hot enough, it would burn whatever you put in,” he says. “So I would eat anything and everything I wanted.”

That attitude is not uncommon among runners. Half of the Runner’s World Twitter followers who responded to a poll said they eat whatever they want because they run and don’t gain weight. Those numbers align with a recent survey of recreational ultrarunners, which found that 62 percent do not follow the American College of Sports Medicine’s recommendations for nutrition, despite being aware of them.

But just because the number on the scale seems healthy doesn’t mean your diet isn’t doing damage on the inside. “Time and time again, I meet runners in their 50s and 60s, who think they’ve done pretty much everything right in their life from a health perspective, who end up with heart disease. When I talk to them about their diets, they are often quite shocking,” says McGillivray’s physician, Aaron Baggish, M.D., director of the Cardiovascular Performance Program at Massachusetts General Hospital Heart Center and associate professor of medicine at Harvard Medical School.

While diet is one of the most important components of health among athletes, it is also one of the least understood, due to lack of clinical trials, says Baggish. Still, he points to overindulgence in simple sugars as “the single most common dietary transgression among any endurance athletes, but specifically runners.” He’s calling out white bread, white pasta, white rice, and refined sugars. “Eat large portions of these, and the body turns them into bad molecules, bad types of fat, bad oxidative sugar species—things that do a lot of damage to the heart vessels,” Baggish explains.

People don’t feel symptoms until the disease is already quite pronounced and progressed.

Still, runners often hear mixed messages about how exercise—particularly high-intensity sessions—can erase the ills of a junk-food habit. A recent study by Christian Duval, Ph.D., a researcher in the department of exercise science at the Université du Québec à Montréal, provides the case in point: Duval fed a small group of men between the ages of 18 and 30 breakfast sandwiches, burgers, fries, dessert, and soft drinks for every meal of the day for two weeks. The subjects ate nary a vegetable, and they were consuming “an enormous amount of saturated fat, a very large amount of sugar, which is even worse than fat, and chemicals found in processed food,” says Duval. But thanks to an additional prescription of interval training, Duval’s subjects didn’t gain weight. What’s more, when he tested their blood for fat buildup and inflammatory processes—main drivers of heart disease, cancer, and other chronic diseases—it didn’t seem like the diet had any effect.

But this study, which was widely reported, was over the course of weeks, not years. The damage from a bad diet can take far longer to register. Take atherosclerosis, a disease that Baggish says festers over many years. “It’s a process that starts when we’re young, and it gradually accelerates over time. People don’t feel symptoms until the disease is already quite pronounced and progressed.”

Bottom line: You can’t outrun bad eating habits. As Baggish puts it, “Even if you exercise like a fiend, if you do other things that are unhealthy, the poor diet choices will catch up with you.”