diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2022-06-20 15:07:02 +0100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2022-06-21 15:25:01 +1000 |
commit | 8bde4793b8b1dfdd6be2f3ddc1fdf4f7f5c5b01e (patch) | |
tree | 38fba1f57243f96294be1c9c1e3d06f8cd1e2872 /util.c | |
parent | 467fdaa25ef3a55b35d6672dc1d63eb8f6f18938 (diff) | |
download | perl-8bde4793b8b1dfdd6be2f3ddc1fdf4f7f5c5b01e.tar.gz |
Also log CopSTASHPV
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -5218,9 +5218,10 @@ S_mem_log_common(enum mem_log_type mlt, const UV n, PERL_UNUSED_RESULT(PerlLIO_write(fd, buf, len)); #ifdef USE_C_BACKTRACE if(strchr(pmlenv,'c') && (mlt == MLT_NEW_SV)) { - /* TODO: get caller package in here when we work out how */ len = my_snprintf(buf, sizeof(buf), - " caller at %s line %d\n", + " caller %s at %s line %d\n", + /* CopSTASHPV can crash early on startup; use CopFILE to check */ + CopFILE(PL_curcop) ? CopSTASHPV(PL_curcop) : "<unknown>", CopFILE(PL_curcop), CopLINE(PL_curcop)); PERL_UNUSED_RESULT(PerlLIO_write(fd, buf, len)); |