<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Recieving BUS Error in execution in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/recieving-bus-error-in-execution/m-p/3445171#M207883</link>
    <description>Hi,&lt;BR /&gt;I know that in the backtrace "attrName=0x1 &lt;ADDRESS 0x1="" out="" of="" bounds=""&gt;". So i had placed a breakpoint at the place where this function is being called to check whether attrName is being correctly passed to the function. &lt;BR /&gt;The last call to this fuction passes *attrName="Name". Is gdb playing games with me?? &lt;BR /&gt;&lt;BR /&gt;The output of gdb --version is :&lt;BR /&gt;&lt;BR /&gt;$ /usr/local/bin/gdb --version&lt;BR /&gt;&lt;BR /&gt;Hewlett-Packard Wildebeest 1.0 (based on GDB 4.16)&lt;BR /&gt;(built for PA-RISC 1.1 or 2.0 (narrow), HP-UX 10.20)&lt;BR /&gt;Copyright 1996, 1997 Free Software Foundation, Inc.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;The function prototype is &lt;BR /&gt;&lt;BR /&gt;void GarudaTclContext::getAttributeInfo(int &amp;amp;mode, aecErrorData &amp;amp;errorData, const char *attrName, auiAttrInfo &amp;amp;attrInfo, int context, int *lockReqd);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Asish&lt;/ADDRESS&gt;</description>
    <pubDate>Fri, 17 Dec 2004 00:56:53 GMT</pubDate>
    <dc:creator>Asish</dc:creator>
    <dc:date>2004-12-17T00:56:53Z</dc:date>
    <item>
      <title>Recieving BUS Error in execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recieving-bus-error-in-execution/m-p/3445167#M207879</link>
      <description>Hi Everyone,&lt;BR /&gt;First, let me give some details about this product. This product (written in C++) uses TCL/TK libraries (version 8.3.3) and extends it by adding new commands to it. It runs on a NCLASS machine (OS --&amp;gt; HP-UX 11.00). Recently we had added some code to improve its functionality but after this code was added it recieves a SIGBUS signal when it executes a particular tcl script (containing nothing but TCl commmands and user added commands). Below is the backtrace obtained in gdb for the concerned core file.&lt;BR /&gt;&lt;BR /&gt;#0  GarudaTclWorld::executeGarudaTickLoop (this=0x401f5170)&lt;BR /&gt;    at src/Garuda/GarudaTclWorld.C:357&lt;BR /&gt;357             while (!getclock(TIMEOFDAY,&amp;amp;abstime))&lt;BR /&gt;#0  GarudaTclWorld::executeGarudaTickLoop (this=0x401f5170)&lt;BR /&gt;    at src/Garuda/GarudaTclWorld.C:357&lt;BR /&gt;357             while (!getclock(TIMEOFDAY,&amp;amp;abstime))&lt;BR /&gt;(gdb) &lt;BR /&gt;(gdb) bt&lt;BR /&gt;#0  GarudaTclWorld::executeGarudaTickLoop (this=0x401f5170)&lt;BR /&gt;    at src/Garuda/GarudaTclWorld.C:357&lt;BR /&gt;#1  0xd86b0 in GarudaAttrInfo::operator= ()&lt;BR /&gt;#2  0x152bc8 in GarudaTclContext::getAttributeInfo (this=0x4114d758, &lt;BR /&gt;    mode=@0x400c1188, errorData=@0x25c, &lt;BR /&gt;    attrName=0x1 &lt;ADDRESS 0x1="" out="" of="" bounds=""&gt;, attrInfo=@0x401f5088, context=0, &lt;BR /&gt;    lockReqd=0x0)&lt;BR /&gt;    at libsrc/Garudautil/GarudaBS/TclContext.C:1469&lt;BR /&gt;#3  0x25da84 in Tcl_DbCkfree (ptr=0x4063c0e8 "", &lt;BR /&gt;    file=0x400c3a90 "libsrc/Garudautil/tcl/generic/tclLiteral.c", line=486)&lt;BR /&gt;    at libsrc/Garudautil/tcl/generic/tclCkalloc.c:525&lt;BR /&gt;#4  0x2c4500 in TclAddLiteralObj (envPtr=0x7b02ef5c, objPtr=0x0, litPtrPtr=0x0)&lt;BR /&gt;    at libsrc/Garudautil/tcl/generic/tclLiteral.c:486&lt;BR /&gt;#5  0xc014c254 in _p_mutex_unlock () from /usr/lib/libc.1&lt;BR /&gt;#6  0xc00a0350 in malloc () from /usr/lib/libc.1&lt;BR /&gt;#7  0xc00a0aa8 in free () from /usr/lib/libc.1&lt;BR /&gt;#8  0x4096d090 in ?? ()&lt;BR /&gt;#9  0x8528c in GarudaTclWorld::executeGarudaTickLoop (this=0x0)&lt;BR /&gt;    at src/Garuda/GarudaTclWorld.C:366&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But this did not help as the functions listed in backtrace are kind of generic and have never been touched for a very long time. I have checked all the code added but everything seems to be allright.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The most absurd part is that i don't get a BUS error if i remove a piece of code which is never getting executed throughout the execution of the program. I am suspecting that something is wrong with the HP-UX aCC compiler that i am using but i can't shift to another compiler.&lt;BR /&gt;&lt;BR /&gt;I have tried compiling the code by giving options like +unum.&lt;BR /&gt;&lt;BR /&gt;I have also tried including call to the function allow_unaligned_access() in my code then linked it with -lhppa option but all this was of no use.&lt;BR /&gt;&lt;BR /&gt;I have also read most of the posting on BUS error in this forum and i tried it in my case but none of them helped.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please help me.&lt;BR /&gt;&lt;BR /&gt;&lt;/ADDRESS&gt;</description>
      <pubDate>Thu, 16 Dec 2004 11:40:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recieving-bus-error-in-execution/m-p/3445167#M207879</guid>
      <dc:creator>Asish</dc:creator>
      <dc:date>2004-12-16T11:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Recieving BUS Error in execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recieving-bus-error-in-execution/m-p/3445168#M207880</link>
      <description>If the code is never executed whats it doing in the program?&lt;BR /&gt;&lt;BR /&gt;This may be a problem with the compiler. Perhaps you should check for patches and isntall them.&lt;BR /&gt;&lt;BR /&gt;Perhaps also run your code through a debugger and see if any errors or warnings or bad pointers pop up.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 16 Dec 2004 12:02:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recieving-bus-error-in-execution/m-p/3445168#M207880</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-12-16T12:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Recieving BUS Error in execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recieving-bus-error-in-execution/m-p/3445169#M207881</link>
      <description>Hi Steven,&lt;BR /&gt;First of all thanks for responding.&lt;BR /&gt;&lt;BR /&gt;The piece of code that i mentioned earlier gets executed in a particular scenario. During the execution of this particular tcl script this code does not get executed. I was able to verify this by putting a breakpoint in gdb at the starting of the concerned code.&lt;BR /&gt;&lt;BR /&gt;Actually, the code is something of the form&lt;BR /&gt;if (condition)&lt;BR /&gt;{&lt;BR /&gt;....&lt;BR /&gt;....&lt;BR /&gt;....&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;    if (condition)&lt;BR /&gt;    {&lt;BR /&gt;    ....&lt;BR /&gt;    ....&lt;BR /&gt;    ....&lt;BR /&gt;    }&lt;BR /&gt;    else&lt;BR /&gt;    {&lt;BR /&gt;        if (condition)&lt;BR /&gt;        {&lt;BR /&gt;        ....&lt;BR /&gt;        ....&lt;BR /&gt;        ....&lt;BR /&gt;        }&lt;BR /&gt;it goes on like this.&lt;BR /&gt;&lt;BR /&gt;Can there be an upper limit on the number of if - else if constructs that i can have?&lt;BR /&gt;&lt;BR /&gt;Even executing the whole program under gdb did not help. Under gdb I was able to figure out where exactly i get a SIGBUS signal but  the piece of code has never been touched for  years and moreover the code looks perfectly allright.&lt;BR /&gt;&lt;BR /&gt;I also tried placing debug messages throughout the program but each time my program cores at a different place. Is it because of some delay in propagating the SIGBUS signal?&lt;BR /&gt;&lt;BR /&gt;Asish&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Dec 2004 23:50:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recieving-bus-error-in-execution/m-p/3445169#M207881</guid>
      <dc:creator>Asish</dc:creator>
      <dc:date>2004-12-16T23:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Recieving BUS Error in execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recieving-bus-error-in-execution/m-p/3445170#M207882</link>
      <description>attrName=0x1 &lt;ADDRESS 0x1="" out="" of="" bounds=""&gt;, &lt;BR /&gt;&lt;BR /&gt;This is the error that jumps out at me because if this argument is a pointer that's a bogus address. Without knowing the protoype for this function, I can't say more.&lt;BR /&gt;&lt;BR /&gt;The levels of if's should not be a problem. In all cases that I have ever seen, the level of nested if's is limited by the compiler and not by the run-time stack.&lt;BR /&gt;&lt;BR /&gt;Yours is the kind of problem that is very difficult to find because I suspect the memory is that is being overwritten is nowhere near the code you think is executing. The actual damage may have been done at some point much earlier in the execution.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/ADDRESS&gt;</description>
      <pubDate>Fri, 17 Dec 2004 00:03:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recieving-bus-error-in-execution/m-p/3445170#M207882</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-12-17T00:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Recieving BUS Error in execution</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/recieving-bus-error-in-execution/m-p/3445171#M207883</link>
      <description>Hi,&lt;BR /&gt;I know that in the backtrace "attrName=0x1 &lt;ADDRESS 0x1="" out="" of="" bounds=""&gt;". So i had placed a breakpoint at the place where this function is being called to check whether attrName is being correctly passed to the function. &lt;BR /&gt;The last call to this fuction passes *attrName="Name". Is gdb playing games with me?? &lt;BR /&gt;&lt;BR /&gt;The output of gdb --version is :&lt;BR /&gt;&lt;BR /&gt;$ /usr/local/bin/gdb --version&lt;BR /&gt;&lt;BR /&gt;Hewlett-Packard Wildebeest 1.0 (based on GDB 4.16)&lt;BR /&gt;(built for PA-RISC 1.1 or 2.0 (narrow), HP-UX 10.20)&lt;BR /&gt;Copyright 1996, 1997 Free Software Foundation, Inc.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;The function prototype is &lt;BR /&gt;&lt;BR /&gt;void GarudaTclContext::getAttributeInfo(int &amp;amp;mode, aecErrorData &amp;amp;errorData, const char *attrName, auiAttrInfo &amp;amp;attrInfo, int context, int *lockReqd);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Asish&lt;/ADDRESS&gt;</description>
      <pubDate>Fri, 17 Dec 2004 00:56:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/recieving-bus-error-in-execution/m-p/3445171#M207883</guid>
      <dc:creator>Asish</dc:creator>
      <dc:date>2004-12-17T00:56:53Z</dc:date>
    </item>
  </channel>
</rss>

