An Application That Works on SPARC Fails With FPU register stack overflow on x86 (Doc ID 1347478.1)

Last updated on AUGUST 03, 2016

Applies to:

Solaris Operating System - Version 10 3/05 to 11.2 [Release 10.0 to 11.0]
Oracle Solaris Studio - Version Forte Developer 6 Update 2 to 12.4 [Release 6.0 to 12]
Oracle Solaris on x86 (32-bit)
Oracle Solaris on x86-64 (64-bit)

Symptoms

An application works fine on Solaris on Sparc, but when migrated to Solaris on x86, fails with an overflow of the floating point unit (FPU) register stack.


Example observed runtime misbehavior:
A floating point value contains an NaN or a -NaN.

Example disassembly output:

(dbx) regs -f
current thread: t@1
current frame: [1]
gs 0x000001c3 0x00000000
fs 0x00000000 0x00000000
es 0x00000043 0x00000000
ds 0x00000043 0x00000000
ss 0x00000043 0x00000000
cs 0x0000003b 0x00000000
edi 0x08047d20
esi 0x08047c70
ebp 0x08047b68
esp 0x08047b60
ebx 0xfefa8584
edx 0x00001c14
ecx 0x00000000
eax 0x00001120
eip 0xfef60167:__pow+0x117 fld %st(1) <---- floating point load of %st(1) on top of the FPU register stack
trapno 0x00000003 0x00000000
err 0x00000000 0x00000000
eflags 0x00000213 0x00000000
st0 +2.46575342465753417909e-02
st1 +1.00024657534246586010e+00
st2 +2.46575342465753417909e-02
st3 +1.00024657534246586010e+00
st4 +9.99993920827985438571e-01
st5 +9.99993920827985438571e-01
st6 +9.99993920827985438571e-01
st7 +9.99993920827985438571e-01
xmm0a-xmm0d 0x00000000 0x00000000 0x00000000 0x00000000
xmm1a-xmm1d 0x00000000 0x00000000 0x00000000 0x00000000
xmm2a-xmm2d 0x00000000 0x00000000 0x00000000 0x00000000
xmm3a-xmm3d 0x00000000 0x00000000 0x00000000 0x00000000
xmm4a-xmm4d 0x00000000 0x00000000 0x00000000 0x00000000
xmm5a-xmm5d 0x00000000 0x00000000 0x00000000 0x00000000
xmm6a-xmm6d 0x00000000 0x00000000 0x00000000 0x00000000
xmm7a-xmm7d 0x00000000 0x00000000 0x00000000 0x00000000
fcw-fsw 0x137f 0x0120
fctw-fop 0x00ff 0x0000
frip 0x00000000 0x00000000
frdp 0x00000000 0x00000000
mxcsr 0x00001f80
(dbx) stepi
t@1 (l@1) stopped in __pow at 0xfef60169
0xfef60169: __pow+0x0119: ftst
(dbx) regs -f
current thread: t@1
current frame: [1]
gs 0x000001c3 0x00000000
fs 0x00000000 0x00000000
es 0x00000043 0x00000000
ds 0x00000043 0x00000000
ss 0x00000043 0x00000000
cs 0x0000003b 0x00000000
edi 0x08047d20
esi 0x08047c70
ebp 0x08047b68
esp 0x08047b60
ebx 0xfefa8584
edx 0x00001c14
ecx 0x00000000
eax 0x00001120
eip 0xfef60169:__pow+0x119 ftst
trapno 0x00000001 0x00000000
err 0x00000000 0x00000000
eflags 0x00000213 0x00000000
st0 -NaN <----- problem has occurred, should be +1.00024657534246586010e+00
st1 +2.46575342465753417909e-02
st2 +1.00024657534246586010e+00
st3 +2.46575342465753417909e-02
st4 +1.00024657534246586010e+00
st5 +9.99993920827985438571e-01
st6 +9.99993920827985438571e-01
st7 +9.99993920827985438571e-01
xmm0a-xmm0d 0x00000000 0x00000000 0x00000000 0x00000000
xmm1a-xmm1d 0x00000000 0x00000000 0x00000000 0x00000000
xmm2a-xmm2d 0x00000000 0x00000000 0x00000000 0x00000000
xmm3a-xmm3d 0x00000000 0x00000000 0x00000000 0x00000000
xmm4a-xmm4d 0x00000000 0x00000000 0x00000000 0x00000000
xmm5a-xmm5d 0x00000000 0x00000000 0x00000000 0x00000000
xmm6a-xmm6d 0x00000000 0x00000000 0x00000000 0x00000000
xmm7a-xmm7d 0x00000000 0x00000000 0x00000000 0x00000000
fcw-fsw 0x137f 0x3b61
fctw-fop 0x00ff 0x0000
frip 0x00000000 0x00000000
frdp 0x00000000 0x00000000
mxcsr 0x00001f80
(dbx)

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms