Beurling-Carleson sets, inner functions and a semilinear equation