Bug 323746 (MONO81062) - [ARM] Single Float byref - using soft-float - leads to Segfault
Summary: [ARM] Single Float byref - using soft-float - leads to Segfault
Status: RESOLVED FIXED
Alias: MONO81062
Product: Mono: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: 1.2
Hardware: Other Linux
: P3 - Medium : Blocker
Target Milestone: ---
Assignee: Paolo Molaro
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-07 01:09 UTC by Eric St-Onge
Modified: 2007-11-05 23:50 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:30:31 UTC


---- Reported by eric_st_onge@hotmail.com 2007-03-06 18:09:04 MST ----

Please fill in this template when reporting a bug, unless you know what 
you are doing.
Description of Problem:
Using 2007 Feb 06 HEAD SVN version. 
Passing byref a Single Float (32 bits) leads systematically to segfault 
on ARM softfloat using the following code.

Initial troubleshooting lead to beleive that mono_fload_r4 receives a 
null pointer at some point. Note that complixier applications make use of 
mono_fload_r4 without problems.

Steps to reproduce the problem:
1. 
	static void Main(string[] args)
	{
		float r4 = 1.11111F;
		PassingR4(ref r4);
	}
	static void PassingR4(ref float r4)
	{
		r4 = r4 + 12.34567F;
	}
2. Execute on mono
3. Segfault

Actual Results:

# MONO_SHARED_DIR=/ram 
MONO_PATH=/mmc/mmca1/mono/bin /mmc/mmca1/mono/bin/mono --trace=all 
STIND_Test.exe
ENTER: (wrapper runtime-invoke) System.Object:runtime_invoke_void_string 
(object,intptr,intptr,intptr)() ip: (nil)
. ENTER: System.OutOfMemoryException:.ctor (string)() ip: (nil)
. . ENTER: System.SystemException:.ctor (string)() ip: (nil)
. . . ENTER: System.Exception:.ctor (string)() ip: (nil)
. . . LEAVE: System.Exception:.ctor (string)
. . . ENTER: System.Exception:set_HResult (int)() ip: (nil)
. . . LEAVE: System.Exception:set_HResult (int)
. . LEAVE: System.SystemException:.ctor (string)
. . ENTER: System.Exception:set_HResult (int)() ip: (nil)
. . LEAVE: System.Exception:set_HResult (int)
. LEAVE: System.OutOfMemoryException:.ctor (string)
LEAVE: (wrapper runtime-invoke) System.Object:runtime_invoke_void_string 
(object,intptr,intptr,intptr)[OBJECT:(nil)]
ENTER: (wrapper runtime-invoke) System.Object:runtime_invoke_void_string 
(object,intptr,intptr,intptr)() ip: (nil)
. ENTER: System.NullReferenceException:.ctor (string)() ip: (nil)
. . ENTER: System.SystemException:.ctor (string)() ip: (nil)
. . . ENTER: System.Exception:.ctor (string)() ip: (nil)
. . . LEAVE: System.Exception:.ctor (string)
. . . ENTER: System.Exception:set_HResult (int)() ip: (nil)
. . . LEAVE: System.Exception:set_HResult (int)
. . LEAVE: System.SystemException:.ctor (string)
. LEAVE: System.NullReferenceException:.ctor (string)
LEAVE: (wrapper runtime-invoke) System.Object:runtime_invoke_void_string 
(object,intptr,intptr,intptr)[OBJECT:(nil)]
ENTER: (wrapper runtime-invoke) System.Object:runtime_invoke_void_string 
(object,intptr,intptr,intptr)() ip: (nil)
. ENTER: System.StackOverflowException:.ctor (string)() ip: (nil)
. . ENTER: System.SystemException:.ctor (string)() ip: (nil)
. . . ENTER: System.Exception:.ctor (string)() ip: (nil)
. . . LEAVE: System.Exception:.ctor (string)
. . . ENTER: System.Exception:set_HResult (int)() ip: (nil)
. . . LEAVE: System.Exception:set_HResult (int)
. . LEAVE: System.SystemException:.ctor (string)
. LEAVE: System.StackOverflowException:.ctor (string)
LEAVE: (wrapper runtime-invoke) System.Object:runtime_invoke_void_string 
(object,intptr,intptr,intptr)[OBJECT:(nil)]
** Message: handle_store_float:2677
** Message: mono_emit_call_args:2454, i=0, sig->hasthis=0
ENTER: (wrapper runtime-invoke) System.Object:runtime_invoke_void_string
[] (object,intptr,intptr,intptr)() ip: (nil)
. ENTER: STIND_Test.Program:Main (string[])() ip: (nil)
. . ENTER: (wrapper managed-to-native) 
System.Object:__icall_wrapper_mono_fstore_r4 (double,intptr)() ip: (nil)
** Message: mono_fstore_r4:595, val=1.111110, ptr=befffc20

. . LEAVE: (wrapper managed-to-native) 
System.Object:__icall_wrapper_mono_fstore_r4 (double,intptr)
. . ENTER: (wrapper managed-to-native) 
System.Object:__icall_wrapper_mono_fload_r4_arg (double)() ip: (nil)
** Message: mono_fload_r4_arg:602, val=0.000000, v=0.000000, *(guint32*)
&v=0

. . LEAVE: (wrapper managed-to-native) 
System.Object:__icall_wrapper_mono_fload_r4_arg (double)result=0
** Message: handle_load_float:2687
** Message: handle_store_float:2677
. . ENTER: STIND_Test.Program:PassingR4 (single&)() ip: (nil)
. . . ENTER: (wrapper managed-to-native) 
System.Object:__icall_wrapper_mono_fload_r4 (intptr)() ip: (nil)
** Message: mono_fload_r4:589, ptr=0

Stacktrace:

  at (wrapper managed-to-native) 
System.Object.__icall_wrapper_mono_fload_r4 (intptr) <0xffffffff>
  at STIND_Test.Program.PassingR4 (single&) <0x00038>
  at STIND_Test.Program.Main (string[]) <0x00067>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void_string[] 
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        /mmc/mmca1/mono/bin/mono [0xf06f8]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]
        [0x409e3754]

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Aborted
#

Expected Results:


How often does this happen? 
systematicaly.

Additional Information:

GLIB 2.12.9

Reading specs from /home/eric//sdks//opt/toolchain-
3.3.1/devkit/arm/iwmmxt_le/bin/../lib/gcc-lib/armv5tel-hardhat-
linux/3.3.1/specs
Configured with: ../configure --host=i686-pc-linux-gnu --target=armv5tel-
hardhat-linux --prefix=/opt/montavista/cee/devkit/arm/iwmmxt_le --exec-
prefix=/opt/montavista/cee/devkit/arm/iwmmxt_le --
bindir=/opt/montavista/cee/devkit/arm/iwmmxt_le/bin --
sbindir=/opt/montavista/cee/devkit/arm/iwmmxt_le/sbin --
sysconfdir=/opt/montavista/cee/devkit/arm/iwmmxt_le/etc --
datadir=/opt/montavista/cee/devkit/arm/iwmmxt_le/share --
includedir=/opt/montavista/cee/devkit/arm/iwmmxt_le/include --
libdir=/opt/montavista/cee/devkit/arm/iwmmxt_le/lib --
libexecdir=/opt/montavista/cee/devkit/arm/iwmmxt_le/libexec --
localstatedir=/opt/montavista/cee/devkit/arm/iwmmxt_le/var --
sharedstatedir=/opt/montavista/cee/devkit/arm/iwmmxt_le/share --
mandir=/opt/montavista/cee/devkit/arm/iwmmxt_le/man --
infodir=/opt/montavista/cee/devkit/arm/iwmmxt_le/info --program-transform-
name=s,^,iwmmxt_le-, --enable-cross --with-
sysroot=/opt/montavista/cee/devkit/arm/iwmmxt_le/target --enable-shared --
enable-languages=c,c++ --enable-__cxa_atexit --enable-threads=posix --
disable-multilib --with-gxx-include-
dir='$'{gcc_tooldir}/../target/usr/include/c++/3.3.1 --with-float=soft --
with-cpu=iwmmxt --with-arch=iwmmxt --with-tune=iwmmxt --with-fpu=vfp
Thread model: posix
gcc version 3.3.1 (MontaVista 3.3.1-7.0.23.custom 2005-05-17)


Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>MontaVista Linux Consumer Electronics Edition 3.1 Linux armv5tel 2.4.20 mvlcee31 mainstone pxa27x</cf_op_sys_details>

Comment 1 Rodrigo Kumpera 2007-11-05 23:50:17 UTC
Fixed in SVN r88938.

Soft float support is still lacking, but the particular spots that the supplied test pointed are fixed.