JDK-4506231 : nsk/regression/b4305163 test dumps core on solx86
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.0,1.4.2,1.4.2_09,5.0
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,linux,solaris
  • CPU: x86,sparc
  • Submitted: 2001-09-24
  • Updated: 2004-01-12
  • Resolved: 2003-12-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2_10Fixed
Related Reports
Duplicate :  
Relates :  
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
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
14-06-2004

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. ======================================================================
11-06-2004