Bug 127908 - backtrace is buggy on IA64
Summary: backtrace is buggy on IA64
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: glibc
Version: 2.1
Hardware: ia64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-07-15 07:39 UTC by Sangmaeshwar Allipuram
Modified: 2016-11-24 15:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-07-15 11:54:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sangmaeshwar Allipuram 2004-07-15 07:39:51 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1)
Gecko/20030225

Description of problem:

Hi,

when i tried to compiled and execute a example program, the backtrace
and backtrace symbols are not procuding correct results.

The machine is IA64 with glibc of version 2.2.4-29.2
 and gcc of version 2.96-112.7.2. 

The example program is 

#include <stdio.h>
#include <stdlib.h>
                                                                     
                                                       
void
print_trace (void)
{
  void *array[3];
  size_t size;
  char **strings;
  size_t i;
                                                                     
                                                       
  size = backtrace (array, 10);
  size = 3;
  strings = backtrace_symbols (array, size);
                                                                     
                                                       
  printf ("Obtained %zd stack frames.\n", size);
                                                                     
                                                       
  for (i = 0; i < size; i++)
     printf ("%s\n", strings[i]);
                                                                     
                                                       
  free (strings);
}
                                                                     
                                                       
/* A dummy function to make the backtrace more interesting. */
void
dummy_function (void)
{
  print_trace ();
}
                                                                     
                                                       
int
main (void)
{
  dummy_function ();
  return 0;
}


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.gcc -rdynamic example.c
2. ./a.out    

Actual Results:  Obtained 3 stack frames.
[0xffea]
[(nil)]
[(nil)]


Expected Results:  some thing like this ...adress may vary ( this is
the result got on 32 bit machine )

Obtained 3 stack frames.
./a.out(print_trace+0x14) [0x80486e4]
./a.out(dummy_function+0xb) [0x804876c]
./a.out(main+0x15) [0x8048783]


Additional info:

Comment 1 Jakub Jelinek 2004-07-15 11:54:28 UTC
On AS2.1 this is expected, IA-64 backtrace has been made to work properly
only this year.  It works now in RHEL3 U3 beta, but the changes
(to both glibc and gcc) are IMHO too invasive for AS2.1 backport.


Note You need to log in before you can comment on or make changes to this bug.