<?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: Porting from TRU64: structured exception handling in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387800#M681889</link>
    <description>&amp;gt;I tried writing the following code with setjmp/longjmp.&lt;BR /&gt;&lt;BR /&gt;If you read the Release Notes, you'll also find that's not supported either with C++.&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B3901-90031/ch05s08.html#v2649446" target="_blank"&gt;http://docs.hp.com/en/B3901-90031/ch05s08.html#v2649446&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B3901-90031/ch05s08.html#v2649455" target="_blank"&gt;http://docs.hp.com/en/B3901-90031/ch05s08.html#v2649455&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Your variable "error" isn't volatile and since setjmp returns a value, you should test that and not "error".</description>
    <pubDate>Fri, 27 Mar 2009 22:48:00 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2009-03-27T22:48:00Z</dc:date>
    <item>
      <title>Porting from TRU64: structured exception handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387795#M681884</link>
      <description>Hi All,&lt;BR /&gt;I am migrating an application from TRU64 to HPUX. The source includes excpt.h and uses the function "exc_raise_signal_exception" as a signal handler for SIGSEGV. HP UX doesnt have this header file. Can any one pls guide me what is the alternative. One alternative could be writing a custom signal handler that throws exceptions. &lt;BR /&gt;Thanks in advance .....</description>
      <pubDate>Wed, 25 Mar 2009 13:47:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387795#M681884</guid>
      <dc:creator>arunava</dc:creator>
      <dc:date>2009-03-25T13:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Porting from TRU64: structured exception handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387796#M681885</link>
      <description>This doesn't exist on HP-UX.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;could be writing a custom signal handler that throws exceptions. &lt;BR /&gt;&lt;BR /&gt;Also the C++ Standard doesn't support throwing from a signal handler.  While not disallowed by the aC++ runtime, the results are unpredictable.</description>
      <pubDate>Wed, 25 Mar 2009 19:19:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387796#M681885</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-03-25T19:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Porting from TRU64: structured exception handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387797#M681886</link>
      <description>Hi Dennis, &lt;BR /&gt;Thanks for the reply. Seems I need to take out the signal handling out of the existing code. Also, I need to compile the source for Itanium. I also read your article : &lt;A href="http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=c5080055abe021100055abe02110275d6e10RCRD" target="_blank"&gt;http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=c5080055abe021100055abe02110275d6e10RCRD&lt;/A&gt;&lt;BR /&gt;Acc to your article, throwing out of a signal handler is not at all possible on itanium.&lt;BR /&gt;&lt;BR /&gt;So was wondering, is there any other way I can simulate the functionality on hp ux. Will try this: catch the signal, set a flag and return from the signal handler. And based on the flag throw an exception. Will try to code this and post the results.</description>
      <pubDate>Thu, 26 Mar 2009 21:08:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387797#M681886</guid>
      <dc:creator>arunava</dc:creator>
      <dc:date>2009-03-26T21:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Porting from TRU64: structured exception handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387798#M681887</link>
      <description>&amp;gt;Seems I need to take out the signal handling out of the existing code.&lt;BR /&gt;&lt;BR /&gt;That's the only way to be supported.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I need to compile the source for Integrity.&lt;BR /&gt;&lt;BR /&gt;Things have changed since that was first written but it is still unsupported.&lt;BR /&gt;I guess it depends on close you want to skate to thin ice.  ;-)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;is there any other way I can simulate the functionality on HP-UX?  Will try this: catch the signal, set a flag and return from the signal handler.&lt;BR /&gt;&lt;BR /&gt;No.  Only by trying a throw and hope your opt level, where it aborts isn't too high.&lt;BR /&gt;Otherwise if you return you will get the trap again.</description>
      <pubDate>Fri, 27 Mar 2009 06:26:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387798#M681887</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-03-27T06:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Porting from TRU64: structured exception handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387799#M681888</link>
      <description>Hi Dennis,&lt;BR /&gt;I tried writing the following code with setjmp/longjmp. Assuming that I call the setjmp/longjump at the correct places, what other dangers could happen with this code. Thanks again for the replies ....&lt;BR /&gt;--------------------------------------&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;SIGNAL.H&gt;&lt;BR /&gt;#include &lt;SETJMP.H&gt;&lt;BR /&gt;&lt;BR /&gt;int error=0;&lt;BR /&gt;jmp_buf jbuff;&lt;BR /&gt;&lt;BR /&gt;struct sigaction foo;&lt;BR /&gt;&lt;BR /&gt;void hand_x(int sig, siginfo_t *siginf, void *ptr){&lt;BR /&gt;    printf("inside hanldler\n");&lt;BR /&gt;    error =1;&lt;BR /&gt;    longjmp(jbuff,sig);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;    struct sigaction foo = {hand_x,0,0};&lt;BR /&gt;    sigaction(SIGSEGV,&amp;amp;foo,0);&lt;BR /&gt;    char * a= "hello";&lt;BR /&gt;    try&lt;BR /&gt;    {&lt;BR /&gt;       setjmp(jbuff);&lt;BR /&gt;       if(error == 1)&lt;BR /&gt;           throw 1;&lt;BR /&gt;       a[10]='a';     //Segmentation fault here&lt;BR /&gt;    }&lt;BR /&gt;    catch(...)&lt;BR /&gt;    {&lt;BR /&gt;       printf("exception raised\n");&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;&lt;/SETJMP.H&gt;&lt;/SIGNAL.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Fri, 27 Mar 2009 12:49:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387799#M681888</guid>
      <dc:creator>arunava</dc:creator>
      <dc:date>2009-03-27T12:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Porting from TRU64: structured exception handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387800#M681889</link>
      <description>&amp;gt;I tried writing the following code with setjmp/longjmp.&lt;BR /&gt;&lt;BR /&gt;If you read the Release Notes, you'll also find that's not supported either with C++.&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B3901-90031/ch05s08.html#v2649446" target="_blank"&gt;http://docs.hp.com/en/B3901-90031/ch05s08.html#v2649446&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B3901-90031/ch05s08.html#v2649455" target="_blank"&gt;http://docs.hp.com/en/B3901-90031/ch05s08.html#v2649455&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Your variable "error" isn't volatile and since setjmp returns a value, you should test that and not "error".</description>
      <pubDate>Fri, 27 Mar 2009 22:48:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387800#M681889</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-03-27T22:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Porting from TRU64: structured exception handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387801#M681890</link>
      <description>Hi Dennis, thanks for all the replies.&lt;BR /&gt;We are removing the signal handling from code, although this means at runtime we are going to get lots of dumps !!</description>
      <pubDate>Mon, 30 Mar 2009 14:07:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387801#M681890</guid>
      <dc:creator>arunava</dc:creator>
      <dc:date>2009-03-30T14:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Porting from TRU64: structured exception handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387802#M681891</link>
      <description>&amp;gt;although this means at runtime we are going to get lots of dumps!&lt;BR /&gt;&lt;BR /&gt;Do you know why you have bad pointers?</description>
      <pubDate>Mon, 30 Mar 2009 23:11:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387802#M681891</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-03-30T23:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Porting from TRU64: structured exception handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387803#M681892</link>
      <description>Hi ..&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;Do you know why you have bad pointers?&lt;BR /&gt;No .. Even going through the tons of source doesnt help.. I guess we have to fix the cause of the dumps as and when we get them.&lt;BR /&gt;&lt;BR /&gt;Thanks a lot ..</description>
      <pubDate>Tue, 14 Apr 2009 09:34:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387803#M681892</guid>
      <dc:creator>arunava</dc:creator>
      <dc:date>2009-04-14T09:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Porting from TRU64: structured exception handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387804#M681893</link>
      <description>&amp;gt;I guess we have to fix the cause of the dumps as and when we get them.&lt;BR /&gt;&lt;BR /&gt;You didn't fix these completely when running under Tru64?</description>
      <pubDate>Tue, 14 Apr 2009 10:42:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387804#M681893</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-04-14T10:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Porting from TRU64: structured exception handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387805#M681894</link>
      <description>On TRU64, the signals (SIGSEGV) were converted to exceptions using the function "exc_raise_signal_exception". And there are huge try..catch blocks that i hav been trying to understand. Also, the code is written by guys who are no longer around. So I cant know in which part of the code or in what scenario, was the programmer expecting the signal. So will try to run and hope I find all causes of the signal.</description>
      <pubDate>Tue, 14 Apr 2009 10:57:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387805#M681894</guid>
      <dc:creator>arunava</dc:creator>
      <dc:date>2009-04-14T10:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Porting from TRU64: structured exception handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387806#M681895</link>
      <description>Are you suggesting that the program got those signals all of the time?  Or that try/catch was just for belts and suspenders type of programming?</description>
      <pubDate>Tue, 14 Apr 2009 11:17:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387806#M681895</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-04-14T11:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Porting from TRU64: structured exception handling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387807#M681896</link>
      <description>&amp;gt;&amp;gt;Are you suggesting that the program got those signals all of the time? &lt;BR /&gt;Yes I think so ...&lt;BR /&gt;&amp;gt;&amp;gt;Or that try/catch was just for belts and suspenders type of programming? &lt;BR /&gt;Not sure about this. Could be a third party lib that caused lots of sigsegv. So .. as of now going through the code .... Thanks for all the help ...</description>
      <pubDate>Tue, 14 Apr 2009 11:38:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/porting-from-tru64-structured-exception-handling/m-p/4387807#M681896</guid>
      <dc:creator>arunava</dc:creator>
      <dc:date>2009-04-14T11:38:48Z</dc:date>
    </item>
  </channel>
</rss>

