Just curious. What if you put a (general aviation or airliner) plane into a hard vacuum chamber? Would its altimeter simply read the highest possible altitude it could? That's rather impossible for general aviation planes as their altimeter can theoretically go on infinitely. Or would the altimeter simply fail?
Analog altimeters are mechanical devices which have a set of air filled discs called aneroid wafers inside which expand or contract with air pressure changes. The expansion or contraction of the wafers is translated to rotational movement which turns the pointers. As air pressure decreases the wafers will expand to their maximum, then stop as they can't move any farther, further decreases in pressure will not increase the altitude readout. A full vacuum may rupture the wafers, which would make the instrument inoperable.
Electronic instruments will behave as they are programmed, so the answers are likely to differ by manufacturer. Although I have no direct experience with this I would expect that when the sensor's pressure data gets below a certain threshold that the computer is more likely to show it as an error rather than show the airplane being at an altitude that's impossible. Ladies and gentlemen, we are not cruising at 150,000ft, I know that much!