United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4506231 : nsk/regression/b4305163 test dumps core on solx86

Details
Type:
Bug
Submit Date:
2001-09-24
Status:
Closed
Updated Date:
2004-01-12
Project Name:
JDK
Resolved Date:
2003-12-08
Component:
client-libs
OS:
solaris,linux,generic
Sub-Component:
2d
CPU:
x86,sparc
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.0,1.4.2,1.4.2_09,5.0
Fixed Versions:
5.0 (b31)

Related Reports
Backport:
Duplicate:
Relates:

Sub Tasks

Description
Test      : nsk/regression/b4305163
TestBase  : /net/sqesvr/export/vsn/VM/merlin/testbase/testbase_nsk
Mode      : -Xmixed, -Xcomp, -Xint.
Platform  : Solx86.

Steps to reproduce
1) cd /net/sqesvr/export/vsn/Gammabase/Bugs/{Bugid}
2) sh doit {JAVA_HOME}

Output:
java version "1.4.0-beta3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b80)
Java HotSpot(TM) Client VM (build 1.4.0-beta3-b80, mixed mode)

==> nsk/regression/b4305163 test LOG:
----> new CubicCurve2D object created!
----> CubicCurve2D object transformed into Shape object!
----> new Stroke object created!
----> createStrokedShape() - will be!

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0xDAFCFF82
Function=Java_sun_dc_pr_PathStroker_finalize+0x9702
Library=/net/jdk.sfbay/export/disk6/promoted/jdk/1.4/beta3/b80/binaries/solx86/jre/lib/i386/libdcpr.so

Current Java thread:
        at sun.dc.pr.PathStroker.endPath(Native Method)
        at java.awt.BasicStroke.createStrokedShape(BasicStroke.java:352)
        at b4305163.run(b4305163.java:27)
        at b4305163.main(b4305163.java:36)

Dynamic libraries:
0x8050000       /usr/local/java/jdk1.4/solx86/bin/java
0xdfb80000      /usr/lib/libthread.so.1
0xdfbc0000      /usr/lib/libdl.so.1
0xdfad0000      /usr/lib/libc.so.1
0xded10000      /net/jdk.sfbay/export/disk6/promoted/jdk/1.4/beta3/b80/binaries/solx86/jre/lib/i386/client/libjvm.so
0xdfa60000      /usr/lib/libCrun.so.1
0xdfa40000      /usr/lib/libsocket.so.1
0xdf990000      /usr/lib/libnsl.so.1
0xdf970000      /usr/lib/libm.so.1
0xdfa80000      /usr/lib/libw.so.1
0xdf940000      /usr/lib/libmp.so.2
0xdf910000      /net/jdk.sfbay/export/disk6/promoted/jdk/1.4/beta3/b80/binaries/solx86/jre/lib/i386/native_threads/libhpi.so
0xdf8d0000      /net/jdk.sfbay/export/disk6/promoted/jdk/1.4/beta3/b80/binaries/solx86/jre/lib/i386/libverify.so
0xdf8a0000      /net/jdk.sfbay/export/disk6/promoted/jdk/1.4/beta3/b80/binaries/solx86/jre/lib/i386/libjava.so
0xdf880000      /net/jdk.sfbay/export/disk6/promoted/jdk/1.4/beta3/b80/binaries/solx86/jre/lib/i386/libzip.so
0xdafc0000      /net/jdk.sfbay/export/disk6/promoted/jdk/1.4/beta3/b80/binaries/solx86/jre/lib/i386/libdcpr.so

Local Time = Mon Sep 24 11:14:25 2001
Elapsed Time = 0
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.0-beta3-b80 mixed mode)
#
# An error report file has been saved as hs_err_pid1439.log.
# Please refer to the file for further information.
#
Abort - core dumped

NOTE : Test passes on other platforms and see also bug 4482611.


###@###.### 2003-08-19

Test dumps core in [libdcpr.so+0x15e9c] b15 on solaris/sparcv9 also.

                                    

Comments
EVALUATION



Name: spR10137			Date: 11/19/2003



The reason of crash is using the macros anglesOct1Cos() in
method cubicCircleApproximation of dcPathStroker.c file.

Array anglesOct1CosTable has only (anglesDEG045 + 1) elements,
i.e. 513. But dcPathStroker.c has two places where we
call this macros with value like ((anglesUnsignedSpan(a0, a1) + 1)/ 2).
But method anglesUnsignedSpan() returns values from range
[anglesDEG000, anglesDEG180], so divide by 2 gives us range
[anglesDEG000, anglesDEG090], i.e. [0, 1024]. The same for
method anglesSignedSpan().

Usual application uses ductus renderer when we have mapped
memory at (anglesOct1CosTable + 1024) address. But small applications
like this test can involve ductus code when we do not have
mapped memory at address above. So we have segmentatioin fault.

There are only two points in ductus code where we use cos and
sin macroses directly. All other code uses more safe methods
anglesCos() and anglesSin(). So I propose to change macroses
by special methods calls.


======================================================================

Name: spR10137			Date: 11/26/2003



Real reason of bug is wrong data we have in point described
above. So fix should provide good formed data in procesCubic()
and processQuadratic() methods of dcPathSroker.c file.

Bad formed data comes from recursion level limitation. We add
"bad" curves to path if max level acheved. We can add lines
instead because this segment is less than 1/16,000,000 of curve
length. So we'll have safe (macros friendly) angle values for
further calculations. Thanks to Jim.


======================================================================
                                     
2004-06-11
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger-beta

FIXED IN:
tiger-beta

INTEGRATED IN:
tiger-b31
tiger-beta

VERIFIED IN:
tiger-beta


                                     
2004-06-14



Hardware and Software, Engineered to Work Together