Thwarting Advanced Code-reuse Attacks