Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 149787 - dev-java/rxtx-2.1.7_pre17 crashes JVM (segfault) when compiled with -fomit-frame-pointer
Summary: dev-java/rxtx-2.1.7_pre17 crashes JVM (segfault) when compiled with -fomit-fr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Java team
URL: http://www.rxtx.org
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-01 16:13 UTC by Bernhard Frauendienst
Modified: 2006-10-29 16:35 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Frauendienst 2006-10-01 16:13:53 UTC
When I compiled the RXTX com port library with "-fomit-frame-pointer" in my CFLAGS, the JVM crashed when I tried to open an (existing and free) port. Without this flag, it works fine.

Error output:

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0xb7e96797, pid=24077, tid=3085117104
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_08-b03 mixed mode)
# Problematic frame:
# C  [libc.so.6+0x63797]  __libc_free+0x47
#



Some dumped information:

---------------  T H R E A D  ---------------

Current thread (0x0805c900):  JavaThread "main" [_thread_in_native, id=24077]

siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000009

Registers:
EAX=0x00000005, EBX=0xb7f4bff4, ECX=0x00000004, EDX=0x00000000
ESP=0xbfeacaf4, EBP=0xbfeacb08, ESI=0x0000000d, EDI=0x0000000d
EIP=0xb7e96797, CR2=0x00000009, EFLAGS=0x00210202

Top of Stack: (sp=0xbfeacaf4)
0xbfeacaf4:   00000006 0805c9c0 b7a18aec 0000000d
0xbfeacb04:   0000000d bfeacb28 b7916a4c 0000000d
0xbfeacb14:   00000000 000008bd 00000000 7f1c0300
0xbfeacb24:   b7a18aec bfeacb48 b782d22a 0000000d
0xbfeacb34:   00000000 00000000 b782d206 b25dc200
0xbfeacb44:   0000000d 0805c9c0 b25d9a9d 0805c9c0
0xbfeacb54:   bfeacc20 0000000d 00005e0d bfeacb94
0xbfeacb64:   b7a18aec bfeacb70 080b93c8 6e65706f

Instructions: (pc=0xb7e96797)
0xb7e96787:   f4 8b 75 f8 8b 7d fc c9 c3 85 ff 74 f1 8d 47 f8
0xb7e96797:   8b 50 04 f6 c2 02 75 61 83 e2 04 8d b3 8c 11 00

Stack: [0xbfcb0000,0xbfeb0000),  sp=0xbfeacaf4,  free space=2034k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libc.so.6+0x63797]  __libc_free+0x47
V  [libjvm.so+0x285a4c]
V  [libjvm.so+0x19c22a]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  gnu.io.RXTXPort.open(Ljava/lang/String;)I+0
j  gnu.io.RXTXPort.<init>(Ljava/lang/String;)V+119
j  gnu.io.RXTXCommDriver.getCommPort(Ljava/lang/String;I)Lgnu/io/CommPort;+49
j  gnu.io.CommPortIdentifier.open(Ljava/lang/String;I)Lgnu/io/CommPort;+80
Comment 1 Bernhard Frauendienst 2006-10-01 16:23:02 UTC
using flag-o-matic.eclass and issuing "filter-flags -fomit-frame-pointer" might be a suitable workaround.
Comment 2 Bernhard Frauendienst 2006-10-05 07:22:42 UTC
This seems to be fixed in newer versions by the way, 2.1.7-r2 in particular
So an upgrade would be more useful than this workaround, since it fixes a bunch of other nasty bugs in the library.

See http://bugs.gentoo.org/show_bug.cgi?id=120962 for a 2.1.7-r2 ebuild submission
Comment 3 Stefan Briesenick (RETIRED) gentoo-dev 2006-10-29 16:35:03 UTC
rxtx-2.1.7.2 is in CVS.