<?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 DEC variable arguments on Itanium in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994319#M34542</link>
    <description>I encountered a peculiar problem while porting our application to Itanium, regarding the handling of variable arguments.&lt;BR /&gt;We have macros defined as shown in the attached reproducer.&lt;BR /&gt;Variable arguments are used to trim the string in different forms, such as removing leading/trailing spaces.&lt;BR /&gt;What I notice is that the behavior of this program is different on the test drive Itanium box which runs 8.2-1 and on our new Itanium box 8.2. On my 8.2 system, the trim function does not work. I have shown the results in both cases below. I don't understand why the OS version should matter. I would appreciate if someone coule throw some light on this.&lt;BR /&gt;&lt;BR /&gt; $ cc/ver&lt;BR /&gt;HP C V7.2-001 on OpenVMS IA64 V8.2-1&lt;BR /&gt;$ r test1/nodeb&lt;BR /&gt;Before calling trim: 1111111111&lt;BR /&gt;After calling trim: 111&lt;BR /&gt;Length after calling trim: 3&lt;BR /&gt;$ r TEST1_V82.EXE/nodeb ----&amp;gt; executable copied over from my machine&lt;BR /&gt;Before calling trim: 1111111111&lt;BR /&gt;After calling trim: 111&lt;BR /&gt;Length after calling trim: 10&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;On my machine:&lt;BR /&gt;$ cc/ver&lt;BR /&gt;HP C V7.2-001 on OpenVMS IA64 V8.2&lt;BR /&gt;$ r test1/nodeb&lt;BR /&gt;Before calling trim: 1111111111&lt;BR /&gt;After calling trim: 111&lt;BR /&gt;Length after calling trim: 10</description>
    <pubDate>Mon, 31 Jul 2006 18:22:55 GMT</pubDate>
    <dc:creator>Malleka Ramachandran</dc:creator>
    <dc:date>2006-07-31T18:22:55Z</dc:date>
    <item>
      <title>DEC variable arguments on Itanium</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994319#M34542</link>
      <description>I encountered a peculiar problem while porting our application to Itanium, regarding the handling of variable arguments.&lt;BR /&gt;We have macros defined as shown in the attached reproducer.&lt;BR /&gt;Variable arguments are used to trim the string in different forms, such as removing leading/trailing spaces.&lt;BR /&gt;What I notice is that the behavior of this program is different on the test drive Itanium box which runs 8.2-1 and on our new Itanium box 8.2. On my 8.2 system, the trim function does not work. I have shown the results in both cases below. I don't understand why the OS version should matter. I would appreciate if someone coule throw some light on this.&lt;BR /&gt;&lt;BR /&gt; $ cc/ver&lt;BR /&gt;HP C V7.2-001 on OpenVMS IA64 V8.2-1&lt;BR /&gt;$ r test1/nodeb&lt;BR /&gt;Before calling trim: 1111111111&lt;BR /&gt;After calling trim: 111&lt;BR /&gt;Length after calling trim: 3&lt;BR /&gt;$ r TEST1_V82.EXE/nodeb ----&amp;gt; executable copied over from my machine&lt;BR /&gt;Before calling trim: 1111111111&lt;BR /&gt;After calling trim: 111&lt;BR /&gt;Length after calling trim: 10&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;On my machine:&lt;BR /&gt;$ cc/ver&lt;BR /&gt;HP C V7.2-001 on OpenVMS IA64 V8.2&lt;BR /&gt;$ r test1/nodeb&lt;BR /&gt;Before calling trim: 1111111111&lt;BR /&gt;After calling trim: 111&lt;BR /&gt;Length after calling trim: 10</description>
      <pubDate>Mon, 31 Jul 2006 18:22:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994319#M34542</guid>
      <dc:creator>Malleka Ramachandran</dc:creator>
      <dc:date>2006-07-31T18:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: DEC variable arguments on Itanium</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994320#M34543</link>
      <description>Malleka,&lt;BR /&gt;&lt;BR /&gt;  Might sound like a dumb answer... but without any investigation, it seems that V8.2-1 is giving the "correct" answer (or, at least, expected one), V8.2 is not. Maybe V8.2-1 fixes a bug in V8.2?&lt;BR /&gt;&lt;BR /&gt;  Is there any particular reason you can't upgrade to V8.2-1? &lt;BR /&gt;</description>
      <pubDate>Mon, 31 Jul 2006 20:41:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994320#M34543</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2006-07-31T20:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: DEC variable arguments on Itanium</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994321#M34544</link>
      <description>Malleka,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I don't understand why the OS version&lt;BR /&gt;&amp;gt;should matter. &lt;BR /&gt;&lt;BR /&gt;  Sorry, maybe I didn't understand your question... Is it "why does the copied image behave correctly on V8.2-1 and not on V8.2?"&lt;BR /&gt;&lt;BR /&gt;  It's all to do with OpenVMS shareable images. Instead of copying run-time-library routines into your executable image at link time, the OpenVMS linker places references to shareable images, which will be found and activated at run time. As well as saving space, this also means your program can benefit from improvements or corrections in run-time-libraries without having to recompile or relink.&lt;BR /&gt;&lt;BR /&gt;  In this case it sounds like there may have been a problem in the V8.2 trim routine, somewhere inside the C runtime library (DECC$SHR.EXE).&lt;BR /&gt;&lt;BR /&gt;  Regardless of where you built the image, when you run your program on V8.2, it uses the V8.2 trim function (incorrect?). When you run it on V8.2-1, it uses the V8.2-1 trim function which is correct.&lt;BR /&gt;&lt;BR /&gt;  The neat trick is OpenVMS maintains upwards compatibility with shareable images. So, if you link your program on a particular version of OpenVMS, it will run on all future versions. That's not necessarily a guarantee that it will behave exactly the same. Sometimes (as may be the case here), the later version will fix a bug. "dash" releases are counted as the same version, so your images can be freely copied between V8.2 and V8.2-1 in either direction.&lt;BR /&gt;&lt;BR /&gt;  OpenVMS has had shareable images since V2 (circa 1981). Other operating systems have borrowed the idea, but they don't seem to use them as much, or as effectively as OpenVMS. Windows calls them DLLs (Dynamic Link Libraries) but often seems to end up with multiple different versions with the same name. Linux has them too (not sure what they're called) but many people seem to link against object code, instead of the shared code. So, if a bug in an RTL is ever fixed, everything needs to be relinked.</description>
      <pubDate>Mon, 31 Jul 2006 20:53:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994321#M34544</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2006-07-31T20:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: DEC variable arguments on Itanium</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994322#M34545</link>
      <description>Malleka,&lt;BR /&gt;&lt;BR /&gt;I'm not sure why your image compiled on 8.2 works differently than the one compiled on 8.2-1; but there is definitely a bug in the example you included.&lt;BR /&gt;In the main function you declare an array of 10 chars (x_date), and fill it up with ten (10) characters '1'; after calling your function utl_strtrim, you print the result and call the C RTL function strlen. But where is the trailing zero that should terminate C-strings? So, either your utl_strtrim may fail or succeed, or the strlen may fail or succeed, depending on the chance that a zero is found in memory after the 'x_date' variable.&lt;BR /&gt;&lt;BR /&gt;Re: John Gillings&lt;BR /&gt;&lt;QUOTE&gt;&lt;BR /&gt;"dash" releases are counted as the same version, so your images can be freely copied between V8.2 and V8.2-1 in either direction.&lt;BR /&gt;&lt;/QUOTE&gt;&lt;BR /&gt;Sorry John, but this is not the case for Alpha V7.3-1 and V7.3-2; certainly not for images using executive or kernel mode data.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Kris (aka Qkcl)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Aug 2006 01:38:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994322#M34545</guid>
      <dc:creator>Kris Clippeleyr</dc:creator>
      <dc:date>2006-08-01T01:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: DEC variable arguments on Itanium</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994323#M34546</link>
      <description>Kris ,"Sorry John, but this is not the case for Alpha V7.3-1 and V7.3-2; certainly not for images using executive or kernel mode data."&lt;BR /&gt;&lt;BR /&gt;That backward compatability only counts for user mode apps. If you start linking with executive data structures then there is a different (but similar) version control mechanism.&lt;BR /&gt;&lt;BR /&gt;Note V8.2-1 replaced V8.2 for support purposes. Support for V8.2 ends at the end of this year. V8.2-1 was a significant improvement so upgrade as soon as you can.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h71000.www7.hp.com/openvms/openvms_supportchart.html" target="_blank"&gt;http://h71000.www7.hp.com/openvms/openvms_supportchart.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The main bug with the program is the lack of null terminator on the string x_date. It may accidently work if the happens to be a zero byte after x_date in memory.</description>
      <pubDate>Tue, 01 Aug 2006 04:47:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994323#M34546</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2006-08-01T04:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: DEC variable arguments on Itanium</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994324#M34547</link>
      <description>Re: Ian&lt;BR /&gt;&lt;BR /&gt;&lt;QUOTE&gt;&lt;BR /&gt;That backward compatability only counts for user mode apps. If you start linking with executive data structures then there is a different (but similar) version control mechanism.&lt;BR /&gt;&lt;/QUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;You are correct of course. But in the old days, changes to executive cq. kernel data structures only happened between major releases (like V5 to V6); maybe occasionally between "dot"-releases; but certainly never between "dash"-releases.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Kris (aka Qkcl)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Aug 2006 05:57:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994324#M34547</guid>
      <dc:creator>Kris Clippeleyr</dc:creator>
      <dc:date>2006-08-01T05:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: DEC variable arguments on Itanium</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994325#M34548</link>
      <description>Kris,&lt;BR /&gt;  my personal theory is that V7.3-2 should have been V7.4 but was made a dash release for non-technical reasons. There where certainly more changes between V7.3-1 to V7.3-2 than is usual for a dash release.</description>
      <pubDate>Wed, 02 Aug 2006 08:53:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994325#M34548</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2006-08-02T08:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: DEC variable arguments on Itanium</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994326#M34549</link>
      <description>Thanks for all your responses, I noticed the bug in my reproducer, so I didn't get back to you sooner.</description>
      <pubDate>Wed, 02 Aug 2006 13:11:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dec-variable-arguments-on-itanium/m-p/4994326#M34549</guid>
      <dc:creator>Malleka Ramachandran</dc:creator>
      <dc:date>2006-08-02T13:11:35Z</dc:date>
    </item>
  </channel>
</rss>

