On 7/18/2013 5:22 AM, Richard Hipp wrote:

On Thu, Jul 18, 2013 at 2:12 AM, Edward Berner <e...@bernerfam.com <mailto:e...@bernerfam.com>> wrote:

    Hello,

    Using a recent trunk version of fossil, built with gcc on Solaris
    10 on an UltraSPARC system, I get a bus error from "fossil new":

    $ ./fossil new t.fossil
    Bus Error (core dumped)


I'm unable to replicate the problem. The latest Fossil works fine for me on Solaris and SPARC. But see my question below....

Bummer, I'd hoped it would be reproducible. (I wonder what is different about my system.)

Here is some system info, just in case:

$ uname -a
SunOS v245 5.10 Generic_147147-26 sun4u sparc SUNW,Sun-Fire-V245

$ cat /etc/release
                   Oracle Solaris 10 1/13 s10s_u11wos_24a SPARC
Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
                            Assembled 17 January 2013



    $ ./fossil version -v
    This is fossil version 1.26 [5d74ce03da] 2013-07-17 12:56:17 UTC
    Compiled on Jul 17 2013 21:46:29 using gcc-4.8.1 (32-bit)
    SQLite 3.8.0 2013-07-17 11:54:47 64bf8148b8
    zlib 1.2.3


    $ gdb fossil core
    Python Exception <type 'exceptions.ImportError'> No module named gdb:

    warning:
    Could not load the Python gdb module from
    `/opt/gdb7.6/share/gdb/python'.
    Limited Python support is available from the _gdb module.
    Suggest passing --data-directory=/path/to/gdb/data-directory.

    GNU gdb (GDB) 7.6
    Copyright (C) 2013 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later
    <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show
    copying"
    and "show warranty" for details.
    This GDB was configured as "sparc-sun-solaris2.10".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>...
    Reading symbols from /export/home/erb/tmp/t2/fossil...done.
    [New LWP 1]
    [Thread debugging using libthread_db enabled]
    [New Thread 1 (LWP 1)]
    Core was generated by `./fossil new t.fossil'.
    Program terminated with signal 10, Bus error.
    #0  whereLoopAddAll (pBuilder=0xffbff280) at src/sqlite3.c:109401
    109401      pNew->maskSelf = getMask(&pWInfo->sMaskSet,
    pItem->iCursor);
    (gdb) list
    109396    /* Loop over the tables in the join, from left to right */
    109397    pNew = pBuilder->pNew;
    109398    whereLoopInit(pNew);
    109399    for(iTab=0, pItem=pTabList->a; iTab<nTabList; iTab++,
    pItem++){
    109400      pNew->iTab = iTab;
    109401      pNew->maskSelf = getMask(&pWInfo->sMaskSet,
    pItem->iCursor);


Can you use the debugger to give us the value of &pWInfo->sMaskSet please? Perhaps this is an alignment problem.


Adding an extra line for debugging (and compiling with "-O0" so it doesn't disappear) suggests the issue may be with pNew:

     pNew->iTab = iTab;
+    pNew->maskSelf = 1;
     pNew->maskSelf = getMask(&pWInfo->sMaskSet, pItem->iCursor);


$ gdb fossil core
[...]
Core was generated by `./fossil new t.fossil'.
Program terminated with signal 10, Bus error.
#0 0x00177584 in whereLoopAddAll (pBuilder=0xffbfedc4) at src/sqlite3.c:109401
109401      pNew->maskSelf = 1;
(gdb)


(gdb) print &pWInfo->sMaskSet
$1 = (WhereMaskSet *) 0x256e34
(gdb) print pNew
$2 = (WhereLoop *) 0x2570c4
(gdb)


--
Edward Berner

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to