Stability properties for continuous-time linear switched systems are at first determined by the (largest) Lyapunov exponent associated with the system, which is the analogous of the joint spectral radius for the discrete-time case. The purpose of this paper is to provide a characterization of marginally unstable systems, i.e., systems for which the Lyapunov exponent is equal to zero and there exists an unbounded trajectory, and to analyze the asymptotic behavior of their trajectories. Our main contribution consists in pointing out a resonance phenomenon associated with marginal instability. In the course of our study, we derive an upper bound of the state at time t, which is polynomial in t and whose degree is computed from the resonance structure of the system. We also derive analogous results for discrete-time linear switched systems.