libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [libunwind] libunwind-bk on x86-64


From: rajagopal, dwarak
Subject: RE: [libunwind] libunwind-bk on x86-64
Date: Mon, 23 Jan 2006 14:36:34 -0600

In x86-64, Gtest-resume-sig.c and Ltest-resume-sig.c test cases doesn't
seem to work with the gcc4.x compiler but works in 3.x compilers.  

It complains of change in the SP between signals.
Stack pointer changed from 0x7fbfffef5f to 0x7fbfffed4f between signals
FAILURE: detected 1 errors
FAIL: Gtest-resume-sig
Stack pointer changed from 0x7fbfffef5f to 0x7fbfffed4f between signals
FAILURE: detected 1 errors
FAIL: Ltest-resume-sig

I did some differential analysis between the two compilers to see why it
doesn't work with gcc4.x (for -O1 and above optimizations). I found out
that the small while loop before the raising the signal is optimized out
by the 4.x compiler...


  /* Use the FPU a bit; otherwise we get spurious errors should the
     signal handler need to use the FPU for any reason.  This seems to
     happen on x86-64.  */
      while (d > 0.0)
  {
    d /= 2.0;
    ++n;
  }

So when I made the compiler emit the code for this loop, the error goes
away. So I guess we need to modify the test case so that it doesn't
optimize that out in 4.x compilers.

1) But, I don't understand why FPU should be used before the signal is
raised? Is this something to do saving fpu registers between context
switching because the OS won't save fpu registers during context
switching by default unless they are used. 


- Dwarak




-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of rajagopal,
dwarak
Sent: Tuesday, January 10, 2006 11:42 AM
To: Arun Sharma (????); address@hidden
Subject: RE: [libunwind] libunwind-bk on x86-64

The patch I meant here was the patch you got from bkbits to obtain the
latest source from 0.98.5. 

- Dwarak 

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of rajagopal,
dwarak
Sent: Tuesday, January 10, 2006 11:31 AM
To: Arun Sharma (????); address@hidden
Subject: RE: [libunwind] libunwind-bk on x86-64

Arun,
I used the patch you sent and I seem to get 2 errors (8 errors in total)
more than yours.

The SP seems to get corrupted between signals. 

Stack pointer changed from 0x7fbfffef5f to 0x7fbfffed4f between signals
FAILURE: detected 1 errors
FAIL: Gtest-resume-sig
Stack pointer changed from 0x7fbfffef5f to 0x7fbfffed4f between signals
FAILURE: detected 1 errors
FAIL: Ltest-resume-sig

- Dwarak

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
address@hidden
Sent: Wednesday, November 23, 2005 2:42 PM
To: address@hidden
Subject: [libunwind] libunwind-bk on x86-64


Seems to have fewer (6 vs 11) failures compared to 0.98.5.

PASS: test-proc-info
PASS: test-static-link
PASS: test-strerror
PASS: Gtest-bt
PASS: Ltest-bt
PASS: Gtest-exc
PASS: Ltest-exc
PASS: Gtest-init
PASS: Ltest-init
PASS: Gtest-concurrent
PASS: Ltest-concurrent
PASS: Gtest-resume-sig
PASS: Ltest-resume-sig
FAILURE: expected 13, not 4 frames below signal frame
FAIL: Gtest-dyn1
FAILURE: expected 13, not 4 frames below signal frame
FAIL: Ltest-dyn1
/bin/sh: line 1: 19875 Segmentation fault      ${dir}$tst
FAIL: test-async-sig
PASS: test-flush-cache
PASS: test-init-remote
PASS: test-mem
/bin/sh: line 1: 19957 Segmentation fault      ${dir}$tst
FAIL: test-setjmp
PASS: test-ptrace
   ERROR: Symbol "_Ux86_64_getcontext" missing.
   ERROR: Extraneous symbols:
00000000000029e8 T _UI_setcontext
   ERROR: Extraneous symbols:
00000000000022f8 T _UI_setcontext
FAILURE: Detected 3 errors
FAIL: run-check-namespace
PASS: run-ptrace-mapper
FAILURE: unw_step() returned -8 for ip=ffffffffffffffff (start 
ip=2aaaaaab2de6)
unwind failed with ret=-8
FAILURE: unw_step() returned -8 for ip=1 (start ip=4007e7)
unwind failed with ret=-8
FAILURE: detected 4 errors
FAIL: run-ptrace-misc

===========================================
6 of 24 tests failed
Please report to address@hidden
===========================================

Needed a minor patch to pass compilation.

--- a/src/mi/mempool.c  Wed Nov 23 20:32:02 2005
+++ b/src/mi/mempool.c  Wed Nov 23 20:37:22 2005
@@ -24,6 +24,7 @@
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */

  #include "libunwind_i.h"
+#include "mempool.h"

  #define MAX_ALIGN      (sizeof (long double))

_______________________________________________
libunwind mailing list
address@hidden
http://www.hpl.hp.com/hosted/linux/mail-archives/libunwind/



_______________________________________________
libunwind mailing list
address@hidden
http://www.hpl.hp.com/hosted/linux/mail-archives/libunwind/



_______________________________________________
libunwind mailing list
address@hidden
http://www.hpl.hp.com/hosted/linux/mail-archives/libunwind/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]