Stability and instability of solutions of semilinear problems