Bugs item #1896890, was opened at 2008-02-19 13:43 Message generated for change (Comment added) made by stmane You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1896890&group_id=56967
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: PF/compiler Group: Pathfinder 0.22 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Stefan Manegold (stmane) Assigned to: Jan Rittinger (tsheyar) Summary: PF/alg: module-tests segfault on Solaris 10/x86 (32-bit) Initial Comment: While working fine with MPS on all platforms and with ALG on most platforms, all XQuery module test trigger a "Segmentation Fault" (or "Arithmetic Exception") on Solaris 10/x86 (32-bit); see e.g., http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTestsG103/GNU.32.32.d-SunOS5.10/benchmarks_Music_mod_XQ/full_01.err.00.html http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTestsG103/GNU.32.32.d-SunOS5.10/benchmarks_Music_mod_XQ/full_02.err.00.html http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTestsG103/GNU.32.32.d-SunOS5.10/benchmarks_Music_opt_XQ/full_01.err.00.html http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTestsG103/GNU.32.32.d-SunOS5.10/benchmarks_Music_opt_XQ/full_02.err.00.html http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTestsG103/GNU.32.32.d-SunOS5.10/benchmarks_XMark_mod_XQ/q01.err.00.html http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTestsG103/GNU.32.32.d-SunOS5.10/benchmarks_XMark_mod_XQ/q02.err.00.html http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTestsG103/GNU.32.32.d-SunOS5.10/benchmarks_XMark_opt_XQ/q01.err.00.html http://monetdb.cwi.nl/testing/projects/monetdb/Stable/pathfinder/.mTestsG103/GNU.32.32.d-SunOS5.10/benchmarks_XMark_opt_XQ/q02.err.00.html ---------------------------------------------------------------------- >Comment By: Stefan Manegold (stmane) Date: 2008-02-23 08:27 Message: Logged In: YES user_id=572415 Originator: YES The patch that I just suggested for [ 1895125 ] PF: 28 ALG tests still segfault https://sourceforge.net/tracker/index.php?func=detail&aid=1895125&group_id=56967&atid=482468 also seems to work for this one ... ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-02-22 21:29 Message: Logged In: YES user_id=572415 Originator: YES Thanks Jan! In fact, I just did a simple test for the "ALGsegfault" bug as follows: I simply ensure that arrays are initialized with zero as follows: ======== Index: compiler/mem/array.c =================================================================== RCS file: /cvsroot/monetdb/pathfinder/compiler/mem/array.c,v retrieving revision 1.24.6.3 diff -u -r1.24.6.3 array.c --- compiler/mem/array.c 22 Feb 2008 15:13:15 -0000 1.24.6.3 +++ compiler/mem/array.c 22 Feb 2008 20:22:44 -0000 @@ -95,6 +95,9 @@ a->base = PFmalloc (nbytes); + if (a->base) + memset (a->base, 0, nbytes); + a->bound = nbytes / s; a->esize = s; ======== The first result is that the "ALGsegfault" test still fails as before, but now not shows "weird" data, but rather "0xDBDBDBD..." meaning that memory is being accessed that has been GDKfree'ed (en hence wiped-out with our humble version of 0xDeadBeef) ... looks like a dangling pointer to obsolete memory is being maintained/used --- or non-initialized memory is read also outside PFarrays ... Stefan ---------------------------------------------------------------------- Comment By: Jan Rittinger (tsheyar) Date: 2008-02-22 21:20 Message: Logged In: YES user_id=993208 Originator: NO I guess it could be the same reason as for bug [ 1895125 ] PF: 28 ALG tests still segfault. It will interpret bogus data as array because of the missing initialization. ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-02-22 19:34 Message: Logged In: YES user_id=572415 Originator: YES small correction: the division by zero occurs in line 131 of compiler/mem/array.c (rev. 1.24.6.3) ---------------------------------------------------------------------- Comment By: Stefan Manegold (stmane) Date: 2008-02-22 19:27 Message: Logged In: YES user_id=572415 Originator: YES For the first test (benchmarks/Music/mod/XQ/Tests/full_01.*), it appears to be a devision by zero in PFarray_at() (line 134 of compiler/mem/array.c); "a->esize" appear to be "0" !?? See the attached GDB log for details. Please let me know, in case you need more info and/or help. File Added: SolarisSegFault ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=1896890&group_id=56967 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Monetdb-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-bugs
