It is actually not that bizarre. If you look under the BUGS section of
Devel::DProf, you'll find that author has listed a warning that if a subroutine "exits with a
goto(LABEL),
last(LABEL), or
next(LABEL) then perl may crash or Devel::DProf may die with the error" that you got.