Aside from habeas corpus, another situation that could apply is when a court rules that a government measure widely seen as necessary for public safety is unconstitutional. For a current event example, California’s recent ban on gun possession for individuals with domestic violence restraining orders was just struck down in federal court. One could say, “the constitution isn’t a suicide pact, it doesn’t prevent the States from exercising police powers necessary to protect public safety, and this law is an exercise of such powers.”
In this sense, however, I personally think the Constitution is a suicide pact. I believe so far as legality goes, constitutional protections outweigh practical concerns about public safety. If or when it is necessary to abandon it, it will and should be abandoned - but I won’t condone such abandonment as constitutional, nor as legal under the constitution. I say bad laws can make it legal to set the world on fire, or any number of unconscionable things. I say furthermore that public officers (such as judges) who are sworn to uphold the constitution are bound by their oaths to uphold this suicide pact. In my opinion a judge should issue an highly immoral ruling if it is the legally correct one, or should resign (or recuse). My view is not, as I see it, the predominant one.
(What the Governor of California actually said yesterday was, “Judge Cory Wilson, Judge James Ho, and Judge Edith Jones. These three zealots are hellbent on a deranged vision of guns for all, leaving government powerless to protect its people.”)
~Max