# New Ticket Created by "Seneca Cunningham" # Please include the string: [perl #53402] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=53402 >
Currently, non-glibc platforms with backtrace support do not get any symbols identified in the backtrace if BACKTRACE_VERBOSE is not defined. This is due to Parrot_print_backtrace depending upon glibc's formatting of the human-readable backtrace_symbols output. OS X 10.5 formats its output differently in a fixed-width format (on 32-bit ppc). I have attached the fragile, hacky patch I use on my system for the time being that will probably break the moment it meets a 64-bit Mac. Crashing test output before the patch: herodotus:build-20080426 seneca$ ./parrot t/compilers/imcc/syn/macro_32.pir compilers/imcc/imcc.l:1006: failed assertion 'valp->s' Backtrace - Obtained 9 stack frames (max trace depth is 32). (unknown) (unknown) (unknown) (unknown) (unknown) (unknown) (unknown) (unknown) (unknown) Abort trap herodotus:build-20080426 seneca$ Crashing test output after the patch: herodotus:build-20080426 seneca$ ./parrot t/compilers/imcc/syn/macro_32.pir compilers/imcc/imcc.l:1006: failed assertion 'valp->s' Backtrace - Obtained 9 stack frames (max trace depth is 32). Parrot_confess Parrot_confess yylex_destroy yylex yyparse imcc_initialize imcc_run start start Abort trap herodotus:build-20080426 seneca$ -- Seneca Cunningham <[EMAIL PROTECTED]>
Index: src/exceptions.c =================================================================== --- src/exceptions.c (revision 27196) +++ src/exceptions.c (working copy) @@ -1030,7 +1030,12 @@ for (i = 0; i < size; i++) { /* always indent */ const int indent = 2 + (2*i); - const char *caller = strchr(strings[i], '('); +# ifdef __GLIBC__ + char *caller = strchr(strings[i], '('); +# else + /* 50 obtained by counting characters on PPC32 OSX 10.5 */ + char *caller = strings[i]+50; +# endif fprintf(stderr, "%*s", indent, "");