Having your planet swallowed by a star is no fun. But some planets might be able to run the astrophysical gauntlet and make it through more or less intact.

When a star comparable to or somewhat larger than the sun enters advanced age, it swells up into a red giant, expanding far beyond its original radius. In the process, the star’s ballooning atmosphere will consume any nearby planets—such is the fate awaiting the planets of the inner solar system, Earth most likely included.

Mercury, Venus and Earth are all too small to endure engulfment, and will quickly spiral in toward the sun due to drag forces from the surrounding stellar atmosphere. Larger planets or substellar objects called brown dwarfs, however, can actually dispel the star’s bloated exterior and survive. But they may emerge somewhat worse for wear. The density of a star’s expanded atmosphere can strip away the outer layers of an orbiting planet, so what comes out may be very different from what went in.

A new study by Jean-Claude Passy of the American Museum of Natural History in New York City and the University of Victoria in British Columbia and his colleagues in the Astrophysical Journal Letters seeks to uncover what a handful of engulfment survivors may have looked like before their close encounter with a star.

In recent years astronomers have found several planets or brown dwarfs in close orbits around aged stars that should already have passed through their swollen phase. Some of the planetary and brown dwarf survivors, unsurprisingly, are giants—one weighs 55 times as much as Jupiter. But some are considerably smaller—the two planets discovered last year orbiting the former red giant star KIC 05807616 are each less massive than Earth.

The researchers concluded that the modest-size planets orbiting KIC 05807616 must have undergone severe changes during engulfment by their star. These planets, Passy and his colleagues estimate, are remnants of a much larger world—or worlds—a few times the mass of Jupiter. In other words, the progenitor planet was hundreds of times as massive as the survivor.

The larger planets and brown dwarfs known to circle other evolved stars were a different story altogether. Those objects probably escaped engulfment more or less unscathed, the new study found. One caveat: Passy and his colleagues did not consider the effects of planetary evaporation under the star’s heat. The researchers note that evaporation could help diminish planets during stellar engulfment but report that the efficiency of the process is not yet well understood.