Bug 127908

Summary: backtrace is buggy on IA64
Product: Red Hat Enterprise Linux 2.1 Reporter: Sangmaeshwar Allipuram <allipura>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: fweimer
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-07-15 11:54:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.