The computation of viscoelastic flow using macroscopic models is problematic when the Weissenberg number (the ratio of the relaxation time of the fluid considered to a typical flow time) reaches a value of O(1). Either the computed solution develops an instability which eventually leads to numerical blowup, or it becomes mesh-dependent. Despite recent progress, it is still unknown whether 1) this instability is due to poor discretization of the equations, or rather 2) to analytical issues at the continuous level. In this talk, we consider the Oldroyd-B model, a prototypical model for dilute polymeric fluids. We constrain ourselves to the first possible origin of instability, and propose a criterion ensuring stability of a numerical scheme. We do this with the help of a free energy equality known to hold at the continuous level. This lecture is based on joint work with Sebastien Boyaval and Tony Lelievre.