This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug localedata/15870] New: backtrace don't give same result when called between redhat-32bit and redhat-64bit


http://sourceware.org/bugzilla/show_bug.cgi?id=15870

            Bug ID: 15870
           Summary: backtrace don't give same result when called between
                    redhat-32bit and redhat-64bit
           Product: glibc
           Version: 2.18
            Status: NEW
          Severity: normal
          Priority: P2
         Component: localedata
          Assignee: unassigned at sourceware dot org
          Reporter: stigano at 163 dot com
                CC: libc-locales at sourceware dot org

code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <execinfo.h>
#include <fcntl.h>
#include <unistd.h>

void coredump_handle(int sig)
{
   void         *arraypoint[100];
   size_t       size;

   size = backtrace(arraypoint,100);
   return;
}

void core()
{
   int i,j;
   i=0,j=1;
   printf("j/i=[%d]\n",j/i);
}

void test()
{
   core();
}


void core_test()
{
   test();


   int a,b;
   a=1,b=2;
   a= b;
}
int main()
{
   int i,j;

   signal(SIGFPE,coredump_handle);
   core_test();
   i=0,j=1;
   i++;
   return 0;
}


this code run on redhat 32it cannot locate the line where cause coredump,only
locate the line the function called,but on redhat 64-bit do locate the line
cause coredump.  

in functon coredump_handle,if the result of size is n on the 32-bit os,the
result of size always to be n-1.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]