Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#3401 closed defect (fixed)

LeastSquares fails on GCC

Reported by: Adrian Pop Owned by: somebody
Priority: high Milestone: 1.9.4
Component: Interactive Environment Version: trunk
Keywords: Cc:

Description (last modified by Adrian Pop)

Change History (5)

comment:1 by Adrian Pop, 9 years ago

Description: modified (diff)

comment:2 by Adrian Pop, 9 years ago

Running valgrind on it shows some issues:

==27499== Memcheck, a memory error detector
==27499== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==27499== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==27499== Command: /home/adrpo/om/build/bin/omc +locale=C +d=noevalfunc,dynload +showErrorMessages LeastSquares.mos
==27499== 
{"[/home/adrpo/om/testsuite/flattening/modelica/mosfiles/LeastSquares.mos:4:1-4:28:writable] Error: Variable Modelica not found in scope <global scope>.", "TRANSLATION", "Error", "5"}
==27499== Invalid read of size 4
==27499==    at 0x13B949A9: ??? (in /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0)
==27499==    by 0x13B94F28: ??? (in /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0)
==27499==    by 0x4010139: call_init.part.0 (dl-init.c:78)
==27499==    by 0x4010222: _dl_init (dl-init.c:36)
==27499==    by 0x4014C6F: dl_open_worker (dl-open.c:577)
==27499==    by 0x400FFF3: _dl_catch_error (dl-error.c:187)
==27499==    by 0x40143BA: _dl_open (dl-open.c:661)
==27499==    by 0x661102A: dlopen_doit (dlopen.c:66)
==27499==    by 0x400FFF3: _dl_catch_error (dl-error.c:187)
==27499==    by 0x661162C: _dlerror_run (dlerror.c:163)
==27499==    by 0x66110C0: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==27499==    by 0xBB63591: ??? (in /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.0)
==27499==  Address 0x124f5984 is 20 bytes inside a block of size 23 alloc'd
==27499==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27499==    by 0x13B9496A: ??? (in /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0)
==27499==    by 0x13B94F28: ??? (in /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0)
==27499==    by 0x4010139: call_init.part.0 (dl-init.c:78)
==27499==    by 0x4010222: _dl_init (dl-init.c:36)
==27499==    by 0x4014C6F: dl_open_worker (dl-open.c:577)
==27499==    by 0x400FFF3: _dl_catch_error (dl-error.c:187)
==27499==    by 0x40143BA: _dl_open (dl-open.c:661)
==27499==    by 0x661102A: dlopen_doit (dlopen.c:66)
==27499==    by 0x400FFF3: _dl_catch_error (dl-error.c:187)
==27499==    by 0x661162C: _dlerror_run (dlerror.c:163)
==27499==    by 0x66110C0: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==27499== 
==27499== Thread 13:
==27499== Invalid read of size 8
==27499==    at 0x5FBDD54: GC_push_all_eager (mark.c:1509)
==27499==    by 0x5FBDDC2: GC_push_all_stack (mark.c:1519)
==27499==    by 0x5FBF149: GC_push_all_stack_sections (mark_rts.c:555)
==27499==    by 0x5FC98D9: GC_push_all_stacks (pthread_stop_world.c:405)
==27499==    by 0x5FC2BA8: GC_default_push_other_roots (os_dep.c:2588)
==27499==    by 0x5FBF31F: GC_push_roots (mark_rts.c:817)
==27499==    by 0x5FBB722: GC_mark_some (mark.c:352)
==27499==    by 0x5FB1587: GC_stopped_mark (alloc.c:642)
==27499==    by 0x5FB11CC: GC_try_to_collect_inner (alloc.c:461)
==27499==    by 0x5FB279A: GC_collect_or_expand (alloc.c:1270)
==27499==    by 0x5FB2AFC: GC_allocobj (alloc.c:1360)
==27499==    by 0x5FB90BB: GC_generic_malloc_inner (malloc.c:132)
==27499==  Address 0xffeffce08 is on thread 1's stack
==27499== 
==27499== Thread 1:
==27499== Invalid read of size 4
==27499==    at 0x151359A9: ??? (in /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0)
==27499==    by 0x15135F28: ??? (in /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0)
==27499==    by 0x4010139: call_init.part.0 (dl-init.c:78)
==27499==    by 0x4010222: _dl_init (dl-init.c:36)
==27499==    by 0x4014C6F: dl_open_worker (dl-open.c:577)
==27499==    by 0x400FFF3: _dl_catch_error (dl-error.c:187)
==27499==    by 0x40143BA: _dl_open (dl-open.c:661)
==27499==    by 0x661102A: dlopen_doit (dlopen.c:66)
==27499==    by 0x400FFF3: _dl_catch_error (dl-error.c:187)
==27499==    by 0x661162C: _dlerror_run (dlerror.c:163)
==27499==    by 0x66110C0: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==27499==    by 0xBB63591: ??? (in /usr/lib/x86_64-linux-gnu/libltdl.so.7.3.0)
==27499==  Address 0xc6bbb54 is 20 bytes inside a block of size 23 alloc'd
==27499==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27499==    by 0x1513596A: ??? (in /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0)
==27499==    by 0x15135F28: ??? (in /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0)
==27499==    by 0x4010139: call_init.part.0 (dl-init.c:78)
==27499==    by 0x4010222: _dl_init (dl-init.c:36)
==27499==    by 0x4014C6F: dl_open_worker (dl-open.c:577)
==27499==    by 0x400FFF3: _dl_catch_error (dl-error.c:187)
==27499==    by 0x40143BA: _dl_open (dl-open.c:661)
==27499==    by 0x661102A: dlopen_doit (dlopen.c:66)
==27499==    by 0x400FFF3: _dl_catch_error (dl-error.c:187)
==27499==    by 0x661162C: _dlerror_run (dlerror.c:163)
==27499==    by 0x66110C0: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==27499== 
CALL: try to evaluate or generate function: .Modelica.Math.Matrices.leastSquares
CALL: is complete function: .Modelica.Math.Matrices.leastSquares [true]
compileModel: running make -j6 -f Modelica_Math_Matrices_leastSquares.makefile
true
""
[dynload]: [NO SYMTAB] not in in CF list: .Modelica.Math.Matrices.leastSquares
compileModel: successful!
LIB LOAD [./Modelica_Math_Matrices_leastSquares.so].
[dynload]: input parameters:
TYPE[2] -> REAL ARRAY [2] (2, 2, )
TYPE[2] -> REAL ARRAY [1] (2, )
	[1, 2, ]
TYPE[1] -> REAL: 1e-13
[dynload]: calling the function
[dynload]: cevalCallFunction: about to execute Modelica_Math_Matrices_leastSquares
==27499== Syscall param mmap(length) contains uninitialised byte(s)
==27499==    at 0xADB59CA: mmap (syscall-template.S:81)
==27499==    by 0x5FC29FF: GC_unix_mmap_get_mem (os_dep.c:2065)
==27499==    by 0x5FC2B7A: GC_unix_get_mem (os_dep.c:2150)
==27499==    by 0x5FB2400: GC_expand_hp_inner (alloc.c:1179)
==27499==    by 0x5FB289B: GC_collect_or_expand (alloc.c:1305)
==27499==    by 0x5FB8E0F: GC_alloc_large (malloc.c:62)
==27499==    by 0x5FB934E: GC_generic_malloc (malloc.c:196)
==27499==    by 0x5FB95C5: GC_core_malloc_atomic (malloc.c:249)
==27499==    by 0x5FC5659: GC_malloc_atomic (thread_local_alloc.c:209)
==27499==    by 0x4E64A24: real_alloc (memory_pool.c:145)
==27499==    by 0x4E7188C: fill_alloc_real_array (real_array.c:1669)
==27499==    by 0x14F31CE8: omc_Modelica_Math_Matrices_LAPACK_dgelsx(void,...)(char) (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499== 
==27499== Warning: set address range perms: large range [0x3a00e000, 0x63e5e000) (defined)
==27499== Use of uninitialised value of size 8
==27499==    at 0x5FB83F7: get_index (headers.c:222)
==27499==    by 0x5FB857A: GC_install_header (headers.c:265)
==27499==    by 0x5FAFD5B: GC_get_first_part (allchblk.c:500)
==27499==    by 0x5FB05F9: GC_allochblk_nth (allchblk.c:783)
==27499==    by 0x5FB003B: GC_allochblk (allchblk.c:624)
==27499==    by 0x5FB8DE2: GC_alloc_large (malloc.c:63)
==27499==    by 0x5FB934E: GC_generic_malloc (malloc.c:196)
==27499==    by 0x5FB95C5: GC_core_malloc_atomic (malloc.c:249)
==27499==    by 0x5FC5659: GC_malloc_atomic (thread_local_alloc.c:209)
==27499==    by 0x4E64A24: real_alloc (memory_pool.c:145)
==27499==    by 0x4E7188C: fill_alloc_real_array (real_array.c:1669)
==27499==    by 0x14F31CE8: omc_Modelica_Math_Matrices_LAPACK_dgelsx(void,...)(char) (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499== 
==27499== Use of uninitialised value of size 8
==27499==    at 0x5FB84A1: get_index (headers.c:231)
==27499==    by 0x5FB857A: GC_install_header (headers.c:265)
==27499==    by 0x5FAFD5B: GC_get_first_part (allchblk.c:500)
==27499==    by 0x5FB05F9: GC_allochblk_nth (allchblk.c:783)
==27499==    by 0x5FB003B: GC_allochblk (allchblk.c:624)
==27499==    by 0x5FB8DE2: GC_alloc_large (malloc.c:63)
==27499==    by 0x5FB934E: GC_generic_malloc (malloc.c:196)
==27499==    by 0x5FB95C5: GC_core_malloc_atomic (malloc.c:249)
==27499==    by 0x5FC5659: GC_malloc_atomic (thread_local_alloc.c:209)
==27499==    by 0x4E64A24: real_alloc (memory_pool.c:145)
==27499==    by 0x4E7188C: fill_alloc_real_array (real_array.c:1669)
==27499==    by 0x14F31CE8: omc_Modelica_Math_Matrices_LAPACK_dgelsx(void,...)(char) (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499== 
==27499== Conditional jump or move depends on uninitialised value(s)
==27499==    at 0x5FB8500: get_index (headers.c:243)
==27499==    by 0x5FB857A: GC_install_header (headers.c:265)
==27499==    by 0x5FAFD5B: GC_get_first_part (allchblk.c:500)
==27499==    by 0x5FB05F9: GC_allochblk_nth (allchblk.c:783)
==27499==    by 0x5FB003B: GC_allochblk (allchblk.c:624)
==27499==    by 0x5FB8DE2: GC_alloc_large (malloc.c:63)
==27499==    by 0x5FB934E: GC_generic_malloc (malloc.c:196)
==27499==    by 0x5FB95C5: GC_core_malloc_atomic (malloc.c:249)
==27499==    by 0x5FC5659: GC_malloc_atomic (thread_local_alloc.c:209)
==27499==    by 0x4E64A24: real_alloc (memory_pool.c:145)
==27499==    by 0x4E7188C: fill_alloc_real_array (real_array.c:1669)
==27499==    by 0x14F31CE8: omc_Modelica_Math_Matrices_LAPACK_dgelsx(void,...)(char) (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499== 
==27499== Conditional jump or move depends on uninitialised value(s)
==27499==    at 0x5FB8500: get_index (headers.c:243)
==27499==    by 0x5FB8648: GC_install_counts (headers.c:283)
==27499==    by 0x5FB0646: GC_allochblk_nth (allchblk.c:791)
==27499==    by 0x5FB003B: GC_allochblk (allchblk.c:624)
==27499==    by 0x5FB8DE2: GC_alloc_large (malloc.c:63)
==27499==    by 0x5FB934E: GC_generic_malloc (malloc.c:196)
==27499==    by 0x5FB95C5: GC_core_malloc_atomic (malloc.c:249)
==27499==    by 0x5FC5659: GC_malloc_atomic (thread_local_alloc.c:209)
==27499==    by 0x4E64A24: real_alloc (memory_pool.c:145)
==27499==    by 0x4E7188C: fill_alloc_real_array (real_array.c:1669)
==27499==    by 0x14F31CE8: omc_Modelica_Math_Matrices_LAPACK_dgelsx(void,...)(char) (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499==    by 0x14F31640: omc_Modelica_Math_Matrices_leastSquares (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499== 
==27499== Syscall param mmap(start) contains uninitialised byte(s)
==27499==    at 0xADB59CA: mmap (syscall-template.S:81)
==27499==    by 0x5FC29FF: GC_unix_mmap_get_mem (os_dep.c:2065)
==27499==    by 0x5FC2B7A: GC_unix_get_mem (os_dep.c:2150)
==27499==    by 0x5FB81CA: GC_scratch_alloc (headers.c:147)
==27499==    by 0x5FB8450: get_index (headers.c:227)
==27499==    by 0x5FB8648: GC_install_counts (headers.c:283)
==27499==    by 0x5FB0646: GC_allochblk_nth (allchblk.c:791)
==27499==    by 0x5FB003B: GC_allochblk (allchblk.c:624)
==27499==    by 0x5FB8DE2: GC_alloc_large (malloc.c:63)
==27499==    by 0x5FB934E: GC_generic_malloc (malloc.c:196)
==27499==    by 0x5FB95C5: GC_core_malloc_atomic (malloc.c:249)
==27499==    by 0x5FC5659: GC_malloc_atomic (thread_local_alloc.c:209)
==27499== 
==27499== Conditional jump or move depends on uninitialised value(s)
==27499==    at 0x5FB8418: get_index (headers.c:224)
==27499==    by 0x5FB8648: GC_install_counts (headers.c:283)
==27499==    by 0x5FB0646: GC_allochblk_nth (allchblk.c:791)
==27499==    by 0x5FB003B: GC_allochblk (allchblk.c:624)
==27499==    by 0x5FB8DE2: GC_alloc_large (malloc.c:63)
==27499==    by 0x5FB934E: GC_generic_malloc (malloc.c:196)
==27499==    by 0x5FB95C5: GC_core_malloc_atomic (malloc.c:249)
==27499==    by 0x5FC5659: GC_malloc_atomic (thread_local_alloc.c:209)
==27499==    by 0x4E64A24: real_alloc (memory_pool.c:145)
==27499==    by 0x4E7188C: fill_alloc_real_array (real_array.c:1669)
==27499==    by 0x14F31CE8: omc_Modelica_Math_Matrices_LAPACK_dgelsx(void,...)(char) (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499==    by 0x14F31640: omc_Modelica_Math_Matrices_leastSquares (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499== 
==27499== Use of uninitialised value of size 8
==27499==    at 0x5FB83F7: get_index (headers.c:222)
==27499==    by 0x5FB8683: GC_install_counts (headers.c:285)
==27499==    by 0x5FB0646: GC_allochblk_nth (allchblk.c:791)
==27499==    by 0x5FB003B: GC_allochblk (allchblk.c:624)
==27499==    by 0x5FB8DE2: GC_alloc_large (malloc.c:63)
==27499==    by 0x5FB934E: GC_generic_malloc (malloc.c:196)
==27499==    by 0x5FB95C5: GC_core_malloc_atomic (malloc.c:249)
==27499==    by 0x5FC5659: GC_malloc_atomic (thread_local_alloc.c:209)
==27499==    by 0x4E64A24: real_alloc (memory_pool.c:145)
==27499==    by 0x4E7188C: fill_alloc_real_array (real_array.c:1669)
==27499==    by 0x14F31CE8: omc_Modelica_Math_Matrices_LAPACK_dgelsx(void,...)(char) (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499==    by 0x14F31640: omc_Modelica_Math_Matrices_leastSquares (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499== 
==27499== Conditional jump or move depends on uninitialised value(s)
==27499==    at 0x5FB8418: get_index (headers.c:224)
==27499==    by 0x5FB8683: GC_install_counts (headers.c:285)
==27499==    by 0x5FB0646: GC_allochblk_nth (allchblk.c:791)
==27499==    by 0x5FB003B: GC_allochblk (allchblk.c:624)
==27499==    by 0x5FB8DE2: GC_alloc_large (malloc.c:63)
==27499==    by 0x5FB934E: GC_generic_malloc (malloc.c:196)
==27499==    by 0x5FB95C5: GC_core_malloc_atomic (malloc.c:249)
==27499==    by 0x5FC5659: GC_malloc_atomic (thread_local_alloc.c:209)
==27499==    by 0x4E64A24: real_alloc (memory_pool.c:145)
==27499==    by 0x4E7188C: fill_alloc_real_array (real_array.c:1669)
==27499==    by 0x14F31CE8: omc_Modelica_Math_Matrices_LAPACK_dgelsx(void,...)(char) (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499==    by 0x14F31640: omc_Modelica_Math_Matrices_leastSquares (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499== 
==27499== Conditional jump or move depends on uninitialised value(s)
==27499==    at 0x5FAF6E3: setup_header (allchblk.c:232)
==27499==    by 0x5FB0680: GC_allochblk_nth (allchblk.c:795)
==27499==    by 0x5FB003B: GC_allochblk (allchblk.c:624)
==27499==    by 0x5FB8DE2: GC_alloc_large (malloc.c:63)
==27499==    by 0x5FB934E: GC_generic_malloc (malloc.c:196)
==27499==    by 0x5FB95C5: GC_core_malloc_atomic (malloc.c:249)
==27499==    by 0x5FC5659: GC_malloc_atomic (thread_local_alloc.c:209)
==27499==    by 0x4E64A24: real_alloc (memory_pool.c:145)
==27499==    by 0x4E7188C: fill_alloc_real_array (real_array.c:1669)
==27499==    by 0x14F31CE8: omc_Modelica_Math_Matrices_LAPACK_dgelsx(void,...)(char) (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499==    by 0x14F31640: omc_Modelica_Math_Matrices_leastSquares (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499==    by 0x14F31A77: in_Modelica_Math_Matrices_leastSquares (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499== 
==27499== Conditional jump or move depends on uninitialised value(s)
==27499==    at 0x4E718DC: fill_alloc_real_array (real_array.c:1671)
==27499==    by 0x14F31CE8: omc_Modelica_Math_Matrices_LAPACK_dgelsx(void,...)(char) (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499==    by 0x14F31640: omc_Modelica_Math_Matrices_leastSquares (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499==    by 0x14F31A77: in_Modelica_Math_Matrices_leastSquares (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499==    by 0x9BB161F: execute_function (Dynload.cpp:205)
==27499==    by 0x9BB3699: DynLoad_executeFunction (Dynload_omc.cpp:55)
==27499==    by 0x938FF2F: omc_DynLoad_executeFunction (DynLoad.mo:42)
==27499==    by 0x964367F: omc_CevalScript_cevalCallFunctionEvaluateOrGenerate (CevalScript.mo:2396)
==27499==    by 0x9644810: omc_CevalScript_cevalCallFunction (CevalScript.mo:2147)
==27499==    by 0x9B36B13: omc_BackendInterface_cevalCallFunction (BackendInterface.mo:77)
==27499==    by 0x9B12F61: omc_Ceval_cevalWork2 (Ceval.mo:391)
==27499==    by 0x9B1C317: omc_Ceval_cevalWork1 (Ceval.mo:134)
==27499== 
==27499== 
==27499== More than 10000000 total errors detected.  I'm not reporting any more.
==27499== Final error counts will be inaccurate.  Go fix your program!
==27499== Rerun with --error-limit=no to disable this cutoff.  Note
==27499== that errors may occur in your program without prior warning from
==27499== Valgrind, because errors are no longer being displayed.
==27499== 

Limited backtrace at point of segmentation fault
/home/adrpo/om/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaRuntimeC.so(+0x1c57f)[0x4e5357f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340)[0x5b17340]
/home/adrpo/om/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaRuntimeC.so(+0x34cc9)[0x4e6bcc9]
/home/adrpo/om/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaRuntimeC.so(fill_alloc_real_array+0x126)[0x4e718c6]
./Modelica_Math_Matrices_leastSquares.so(omc_Modelica_Math_Matrices_LAPACK_dgelsx__vec+0xd9)[0x14f31ce9]
./Modelica_Math_Matrices_leastSquares.so(omc_Modelica_Math_Matrices_leastSquares+0x191)[0x14f31641]
./Modelica_Math_Matrices_leastSquares.so(in_Modelica_Math_Matrices_leastSquares+0x1a8)[0x14f31a78]
/home/adrpo/om/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(+0x1f97620)[0x9bb1620]
/home/adrpo/om/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(DynLoad_executeFunction+0x8a)[0x9bb369a]
/home/adrpo/om/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_DynLoad_executeFunction+0x50)[0x938ff30]
/home/adrpo/om/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_CevalScript_cevalCallFunctionEvaluateOrGenerate+0x1ee0)[0x9643680]
/home/adrpo/om/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_CevalScript_cevalCallFunction+0xb41)[0x9644811]
/home/adrpo/om/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_BackendInterface_cevalCallFunction+0x94)[0x9b36b14]
/home/adrpo/om/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_Ceval_cevalWork2+0x2b52)[0x9b12f62]
/home/adrpo/om/build/bin/../lib/x86_64-linux-gnu/omc/libOpenModelicaCompiler.so(omc_Ceval_cevalWork1+0x138)[0x9b1c318]
==27499== 
==27499== Process terminating with default action of signal 11 (SIGSEGV)
==27499==  Access not within mapped region at address 0x63F9E000
==27499==    at 0x4E6BCC9: real_set (real_array.c:52)
==27499==    by 0x4E718C5: fill_alloc_real_array (real_array.c:1672)
==27499==    by 0x14F31CE8: omc_Modelica_Math_Matrices_LAPACK_dgelsx(void,...)(char) (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499==    by 0x14F31640: omc_Modelica_Math_Matrices_leastSquares (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499==    by 0x14F31A77: in_Modelica_Math_Matrices_leastSquares (in /home/adrpo/om/testsuite/flattening/modelica/mosfiles/Modelica_Math_Matrices_leastSquares.so)
==27499==    by 0x9BB161F: execute_function (Dynload.cpp:205)
==27499==    by 0x9BB3699: DynLoad_executeFunction (Dynload_omc.cpp:55)
==27499==    by 0x938FF2F: omc_DynLoad_executeFunction (DynLoad.mo:42)
==27499==    by 0x964367F: omc_CevalScript_cevalCallFunctionEvaluateOrGenerate (CevalScript.mo:2396)
==27499==    by 0x9644810: omc_CevalScript_cevalCallFunction (CevalScript.mo:2147)
==27499==    by 0x9B36B13: omc_BackendInterface_cevalCallFunction (BackendInterface.mo:77)
==27499==    by 0x9B12F61: omc_Ceval_cevalWork2 (Ceval.mo:391)
==27499==  If you believe this happened as a result of a stack
==27499==  overflow in your program's main thread (unlikely but
==27499==  possible), you can try to increase the size of the
==27499==  main thread stack using the --main-stacksize= flag.
==27499==  The main thread stack size used in this run was 8388608.
==27499== 
==27499== HEAP SUMMARY:
==27499==     in use at exit: 373,216 bytes in 200 blocks
==27499==   total heap usage: 1,627,151 allocs, 1,626,951 frees, 2,191,623,490 bytes allocated
==27499== 
==27499== LEAK SUMMARY:
==27499==    definitely lost: 245,080 bytes in 82 blocks
==27499==    indirectly lost: 320 bytes in 1 blocks
==27499==      possibly lost: 4,029 bytes in 16 blocks
==27499==    still reachable: 123,787 bytes in 101 blocks
==27499==         suppressed: 0 bytes in 0 blocks
==27499== Rerun with --leak-check=full to see details of leaked memory
==27499== 
==27499== For counts of detected and suppressed errors, rerun with: -v
==27499== Use --track-origins=yes to see where uninitialised values come from
==27499== ERROR SUMMARY: 10000000 errors from 14 contexts (suppressed: 458630 from 125)
/home/adrpo/bin/valgrind-boehm: line 2: 27499 Killed                  valgrind --suppressions="$HOME/.valgrind/boehm-gc.suppressions" $*

comment:3 by Per Östlund, 9 years ago

Resolution: fixed
Status: newclosed

Fixed in 7079463. The issue was that Martins changes in 50e2ca6 changed the order of some buffers for external C functions, but not for F77. So some variables were used before they were initialized. It should've segfaulted with Clang too (it did for me), but seems like it worked on Hudson anyway.

comment:4 by Dietmar Winkler, 9 years ago

Milestone: Futurepre1.9.4

It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.

comment:5 by Martin Sjölund, 7 years ago

Milestone: pre1.9.41.9.4

Removing the pre1.9.4 milestone in favor of 1.9.4.

Note: See TracTickets for help on using tickets.