Almost anything might go wrong with lprof. It works by maximizing the
log-likelihood subject to a constraint
on the value of the variable being profiled. This process drags the
values into what might be areas where the
function becomes unstable in some way.
Hard to say more about a particular case without seeing it
Dave