I get this graphical error with linum-mode in my Emacs. I tried upgrading from 23 to 24 (via git) and I’ve tried both with various supplied binaries online and with my home-compiled version. What I’m really interested in is where to start diagnosing the problem.

The problem goes away if I scroll the torn line numbers off screen and back in.
I have experienced the same problem and spent quite some time trying to resolve it. The graphical error is a result of a clash between linum-mode and how the fringe is rendered. Unfortunately, I was unable to resolve the problem in linum.el, and the fringe display code is part of the C-source.
It can still be done! The easiest way to fix it is to just turn off the fringe.
To make the fringe permanently stay off, I recommend customizing the settings with
M-x customize-group RET fringebecause some compiled versions of Emacs for Mac OS X have their own fringe settings that can override parts of your .emacs file.I don’t really need those line wrap indicators, so not having a fringe doesn’t bother me. However, I did miss a slight separation between the line numbers and the buffer text. I followed the advice of a post on the Emacs Wiki to get that spacing back. In version 0.9x of linum, change line 160 from
to
The inspiration for this change is here: http://www.emacswiki.org/emacs/LineNumbers
There are arguments at the source link to set the
linum-formatvariable instead of modifying linum.el. While I understand where they are coming from, most color-themes these days would color the extra space and not provide what I am looking for (a separation of about a space that is the background color). If you do edit linum.el, make sure to runto make the changes persistent. You can see the result of this by looking at the space before the cursor in the picture found here: https://i.stack.imgur.com/TxyMr.png (I don’t have enough reputation to embed images).
No more graphical artifacts!