masochistic personality

n.
  1. A personality disorder characterized by the exploitation or infliction of pain on others or oneself so as to gain personal satisfaction or pleasure.
The American Heritage® Stedman's Medical Dictionary Copyright © 2002, 2001, 1995 by Houghton Mifflin Company. Published by Houghton Mifflin Company.