On Mon, Jun 8, 2009 at 2:12 PM, Joshua ben Jore<[email protected]> wrote:
> On Mon, Jun 8, 2009 at 12:41 PM, Joshua ben Jore<[email protected]> wrote:
>> Using r759, I'm getting a segmentation fault somewhere during report
>> generation. Anyone else seeing problems? I'm suspecting Tim's recent
>> "(eval 0)" code in r750. Attached a profile. BTW, to test this stuff
>> easier, file names for source can be faked with #line X "XXX"
>> directives in the source.

Got it. The faked-up file didn't exist hard enough yet. Will commit
later when I have a test.

diff --git a/NYTProf.xs b/NYTProf.xs
index c06d451..247a91f 100644
--- a/NYTProf.xs
+++ b/NYTProf.xs
@@ -3377,6 +3377,8 @@ load_profile_data_from_stream(SV *cb)
                     /* this eval fid points to the fid that contained
the eval */
                     av_store(av, NYTP_FIDi_EVAL_FI,
sv_rvweaken(newSVsv(eval_fi)));
                     /* the fid that contained the eval has a list of
eval fids */
+                    if (!SvROK(eval_fi))  /* autoviv, in particular,
"/unknown-eval-invoker" */
+                      sv_setsv(eval_fi, newRV_noinc((SV*)newAV()));
                     has_evals = *av_fetch((AV *)SvRV(eval_fi),
NYTP_FIDi_HAS_EVALS, 1);
                     if (!SvROK(has_evals)) /* autoviv */
                         sv_setsv(has_evals, newRV_noinc((SV*)newAV()));

Josh

--~--~---------~--~----~------------~-------~--~----~
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to