<?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: nulptr dereferences trap in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251520#M687653</link>
    <description>I can't run anything on M1. M1 is production box. I'm not allowed to touch it.</description>
    <pubDate>Fri, 15 Aug 2008 21:19:45 GMT</pubDate>
    <dc:creator>zorin09</dc:creator>
    <dc:date>2008-08-15T21:19:45Z</dc:date>
    <item>
      <title>nulptr dereferences trap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251514#M687647</link>
      <description>I have a COBOL program, which call a C routine. The C code is trying to deference a NULL pointer. The "nulptr dereferences trap" is disabled in the executable. This program runs fine on a HP UX machine "M4"(host name) with below configuration :&lt;BR /&gt;&lt;BR /&gt;OS info:&lt;BR /&gt;   sysname  = HP-UX&lt;BR /&gt;   nodename = ---removed intentionally---&lt;BR /&gt;   release  = B.11.23&lt;BR /&gt;   version  = U (unlimited-user license)&lt;BR /&gt;   machine  = ia64&lt;BR /&gt;   idnumber = ---removed intentionally---&lt;BR /&gt;   vmunix _release_version:&lt;BR /&gt;@(#) $Revision: vmunix:    B11.23_LR FLAVOR=perf Fri Aug 29 22:35:38 PDT 2003 $&lt;BR /&gt;&lt;BR /&gt;If I "chatr -z " (enable the "nulptr dereferences trap")on the exe, then is crashes in runtime on machine M4. This is fine and expected.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;However if I run the same exe(with "nulptr dereferences trap" disabled) on another HP UX machine M1(host name) with the same OS/HW specs as M4, the exe crashes in runtime with "Bus error". Below if the stack trace of the core:&lt;BR /&gt;&lt;BR /&gt;(gdb) bt&lt;BR /&gt;#0  0x60000000cb0c87f0:0 in signal_handler_catch () at opsig.c:165&lt;BR /&gt;#1  &lt;SIGNAL handler="" called=""&gt;&lt;BR /&gt;#2  0x60000000cb0c87f0:0 in signal_handler_catch () at opsig.c:165&lt;BR /&gt;#3  &lt;SIGNAL handler="" called=""&gt;&lt;BR /&gt;#4  0x2be0790:1 in blbn_rankCopyBuf+0x251 ()&lt;BR /&gt;#5  0x110d720:0 in &lt;UNKNOWN_PROCEDURE&gt; + 0xf6a0 ()&lt;BR /&gt;#6  0x1263e10:0 in &lt;UNKNOWN_PROCEDURE&gt; + 0xcd0 ()&lt;BR /&gt;#7  0x1262910:0 in &lt;UNKNOWN_PROCEDURE&gt; + 0x13a0 ()&lt;BR /&gt;#8  0x7c4d60:0 in &lt;UNKNOWN_PROCEDURE&gt; + 0x3630 ()&lt;BR /&gt;#9  0x60000000cb19f850:0 in mFt_xe_xcall+0x130 ()&lt;BR /&gt;   from /opt/cobol_exp/lib/libcobrts.so.2&lt;BR /&gt;#10 0x60000000cb152870:0 in _mFgmain () at rtgmain.c:252&lt;BR /&gt;#11 0x7c14e0:0 in main+0x60 ()&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;What I don't understand is that even thoug the "nulptr dereferences trap" is disabled why the NULL pointer dereferencing is trapped on M1? Is there some kernel/environement level setting that is enabling the "nulptr dereferences trap".&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/UNKNOWN_PROCEDURE&gt;&lt;/UNKNOWN_PROCEDURE&gt;&lt;/UNKNOWN_PROCEDURE&gt;&lt;/UNKNOWN_PROCEDURE&gt;&lt;/SIGNAL&gt;&lt;/SIGNAL&gt;</description>
      <pubDate>Wed, 13 Aug 2008 14:53:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251514#M687647</guid>
      <dc:creator>zorin09</dc:creator>
      <dc:date>2008-08-13T14:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: nulptr dereferences trap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251515#M687648</link>
      <description>&amp;gt;What I don't understand is that even though the "nulptr dereferences trap" is disabled why the NULL pointer dereferencing is trapped on M1?&lt;BR /&gt;&lt;BR /&gt;Why do you think you have a null pointer?  You could have a bad pointer.  And you never can store into a null pointer.&lt;BR /&gt;&lt;BR /&gt;You would need to do:&lt;BR /&gt;(gdb) disas $pc-16*4 $pc+16&lt;BR /&gt;(gdb) info reg</description>
      <pubDate>Thu, 14 Aug 2008 05:47:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251515#M687648</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-08-14T05:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: nulptr dereferences trap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251516#M687649</link>
      <description>Thanks for your inputs Dennis. I can see in the code that it is trying to access a NULL pointer. I have attached the output of the commands that you had provided in your reply. &lt;BR /&gt;&lt;BR /&gt;(gdb) bt&lt;BR /&gt;#0  0x6443470:0 in blbn_rankCopyBuf+0x240 ()&lt;BR /&gt;#1  0x640ffa0:0 in &lt;UNKNOWN_PROCEDURE&gt; + 0xf6a0 ()&lt;BR /&gt;#2  0x800f4d0:0 in &lt;UNKNOWN_PROCEDURE&gt; + 0xcd0 ()&lt;BR /&gt;#3  0x800dfb0:0 in &lt;UNKNOWN_PROCEDURE&gt; + 0x13a0 ()&lt;BR /&gt;#4  0xc99fc0:0 in &lt;UNKNOWN_PROCEDURE&gt; + 0x3630 ()&lt;BR /&gt;#5  0x60000000cdbf6850:0 in mFt_xe_xcall+0x130 ()&lt;BR /&gt;   from /opt/cobol_exp40/lib/libcobrts.so.2&lt;BR /&gt;#6  0x60000000cdba9870:0 in _mFgmain () at rtgmain.c:252&lt;BR /&gt;#7  0xc96720:0 in main+0x60 ()&lt;BR /&gt;(gdb) disas $pc-16*4 $pc+16&lt;BR /&gt;Dump of assembler code from 0x6443430:0 to 0x6443480:0:&lt;BR /&gt;0x6443430:0 &lt;BLBN_RANKCOPYBUF&gt;:         ld4              r8=[r8];;&lt;BR /&gt;0x6443430:1 &lt;BLBN_RANKCOPYBUF&gt;:         cmp4.ge          p6=r40,r8&lt;BR /&gt;0x6443430:2 &lt;BLBN_RANKCOPYBUF&gt;:         nop.i            0x0&lt;BR /&gt;0x6443440:0 &lt;BLBN_RANKCOPYBUF&gt;:         nop.m            0x0&lt;BR /&gt;0x6443440:1 &lt;BLBN_RANKCOPYBUF&gt;:         nop.m            0x0&lt;BR /&gt;0x6443440:2 &lt;BLBN_RANKCOPYBUF&gt;:&lt;BR /&gt;    (p6)  br.cond.dptk.few blbn_rankCopyBuf+0x1070;;&lt;BR /&gt;0x6443450:0 &lt;BLBN_RANKCOPYBUF&gt;:         shladd           r8=r40,2,r0&lt;BR /&gt;0x6443450:1 &lt;BLBN_RANKCOPYBUF&gt;:         addl             r9=36,r1;;&lt;BR /&gt;0x6443450:2 &lt;BLBN_RANKCOPYBUF&gt;:         nop.i            0x0&lt;BR /&gt;0x6443460:0 &lt;BLBN_RANKCOPYBUF&gt;:         ld4              r9=[r9]&lt;BR /&gt;0x6443460:1 &lt;BLBN_RANKCOPYBUF&gt;:         nop.i            0x0;;&lt;BR /&gt;0x6443460:2 &lt;BLBN_RANKCOPYBUF&gt;:         addp4            r8=r8,r9;;&lt;BR /&gt;0x6443470:0 &lt;BLBN_RANKCOPYBUF&gt;:         ld4              r8=[r8]&lt;BR /&gt;0x6443470:1 &lt;BLBN_RANKCOPYBUF&gt;:         nop.i            0x0;;&lt;BR /&gt;0x6443470:2 &lt;BLBN_RANKCOPYBUF&gt;:         addp4            r8=0,r8;;&lt;BR /&gt;End of assembler dump.&lt;BR /&gt;(gdb) info reg&lt;BR /&gt;  pr0:                0x1&lt;BR /&gt;  pr1:                  0&lt;BR /&gt;  pr2:                0x1&lt;BR /&gt;  pr3:                  0&lt;BR /&gt;  pr4:                  0&lt;BR /&gt;  pr5:                  0&lt;BR /&gt;  pr6:                  0&lt;BR /&gt;  pr7:                  0&lt;BR /&gt;  pr8:                  0&lt;BR /&gt;  pr9:                  0&lt;BR /&gt; pr10:                  0&lt;BR /&gt; pr11:                0x1&lt;BR /&gt; pr12:                0x1&lt;BR /&gt; pr13:                0x1&lt;BR /&gt; pr14:                0x1&lt;BR /&gt; pr15:                  0&lt;BR /&gt; pr16:                  0&lt;BR /&gt; pr17:                  0&lt;BR /&gt; pr18:                  0&lt;BR /&gt; pr19:                  0&lt;BR /&gt; pr20:                  0&lt;BR /&gt; pr21:                  0&lt;BR /&gt; pr22:                  0&lt;BR /&gt; pr23:                  0&lt;BR /&gt; pr24:                  0&lt;BR /&gt; pr25:                  0&lt;BR /&gt; pr26:                  0&lt;BR /&gt; pr27:                  0&lt;BR /&gt; pr28:                  0&lt;BR /&gt; pr29:                  0&lt;BR /&gt; pr30:                  0&lt;BR /&gt; pr31:                  0&lt;BR /&gt; pr32:                  0&lt;BR /&gt; pr33:                  0&lt;BR /&gt; pr34:                  0&lt;BR /&gt; pr35:                  0&lt;BR /&gt; pr36:                  0&lt;BR /&gt; pr37:                  0&lt;BR /&gt; pr38:                  0&lt;BR /&gt; pr39:                  0&lt;BR /&gt; pr40:                  0&lt;BR /&gt; pr41:                  0&lt;BR /&gt; pr42:                  0&lt;BR /&gt; pr43:                  0&lt;BR /&gt; pr44:                  0&lt;BR /&gt; pr45:                  0&lt;BR /&gt; pr46:                  0&lt;BR /&gt; pr47:                  0&lt;BR /&gt; pr48:                  0&lt;BR /&gt; pr49:                  0&lt;BR /&gt; pr50:                  0&lt;BR /&gt; pr51:                  0&lt;BR /&gt; pr52:                  0&lt;BR /&gt; pr53:                  0&lt;BR /&gt; pr54:                  0&lt;BR /&gt; pr55:                  0&lt;BR /&gt; pr56:                  0&lt;BR /&gt; pr57:                  0&lt;BR /&gt; pr58:                  0&lt;BR /&gt; pr59:                  0&lt;BR /&gt; pr60:                  0&lt;BR /&gt; pr61:                  0&lt;BR /&gt; pr62:                  0&lt;BR /&gt; pr63:                  0&lt;BR /&gt;  gr0:                  0&lt;BR /&gt;  gr1:          0x90e1e08&lt;BR /&gt;  gr2:                  0&lt;BR /&gt;  gr3:             0x2001&lt;BR /&gt;  gr4:                  0&lt;BR /&gt;  gr5: 0xc000000000000408&lt;BR /&gt;  gr6: 0x60000000c004b4e0&lt;BR /&gt;  gr7: 0x200000007fff357c&lt;BR /&gt;  gr8:                  0&lt;BR /&gt;  gr9:                  0&lt;BR /&gt; gr10: 0x200000007fff3230&lt;BR /&gt; gr11:                  0&lt;BR /&gt; gr12: 0x200000007fff3270&lt;BR /&gt; gr13: 0x200000006744a080&lt;BR /&gt; gr14:                0x8&lt;BR /&gt; gr15: 0x200000007fff29e4&lt;BR /&gt; gr16: 0x20000000675f31a0&lt;BR /&gt; gr17:               0x28&lt;BR /&gt; gr18:         0x67449cd3&lt;BR /&gt; gr19:                  0&lt;BR /&gt; gr20: 0x200000007fff29e5&lt;BR /&gt; gr21:               0x7e&lt;BR /&gt; gr22: 0x2000000067449d00&lt;BR /&gt; gr23: 0x200000007fff29e6&lt;BR /&gt; gr24: 0x2000000067449d01&lt;BR /&gt; gr25:         0x675f8560&lt;BR /&gt; gr26:               0x37&lt;BR /&gt; gr27:               0x34&lt;BR /&gt; gr28: 0x200000007fff29e7&lt;BR /&gt; gr29:          0xfb628ac&lt;BR /&gt; gr30:                  0&lt;BR /&gt; gr31: 0x200000007fff3070&lt;BR /&gt; gr32:          0xfb36470&lt;BR /&gt; gr33:          0x910a530&lt;BR /&gt; gr34:          0xfb364a0&lt;BR /&gt; gr35:          0xfb36470&lt;BR /&gt; gr36:          0x910a530&lt;BR /&gt; gr37:          0xfb364a0&lt;BR /&gt; gr38:                  0&lt;BR /&gt; gr39:                  0&lt;BR /&gt; gr40:                  0&lt;BR /&gt; gr41:          0x643f5bc&lt;BR /&gt; gr42:                  0&lt;BR /&gt; gr43:               0x4e&lt;BR /&gt; gr44:          0x9c66e08&lt;BR /&gt; gr45:               0x42&lt;BR /&gt; gr46:               0x4d&lt;BR /&gt; gr47: 0xc000000000002c60&lt;BR /&gt; gr48:          0x90e1e08&lt;BR /&gt; gr49:          0x640ffa0&lt;BR /&gt; gr50:           0x4d4720&lt;BR /&gt; gr51:                0x2&lt;BR /&gt; gr52: 0x20000000675ef580&lt;BR /&gt; gr53: 0x200000007fff3224&lt;BR /&gt; gr54: 0x200000007fff3228&lt;BR /&gt; gr55: 0x20000000675f2c20&lt;BR /&gt; gr56: 0x20000000675ef588&lt;BR /&gt; gr57:               0x33&lt;BR /&gt;  br0:          0x6443410&lt;BR /&gt;  br1:                  0&lt;BR /&gt;  br2:                  0&lt;BR /&gt;  br3:                  0&lt;BR /&gt;  br4:                  0&lt;BR /&gt;  br5:                  0&lt;BR /&gt;  br6: 0x60000000c0333a10&lt;BR /&gt;  br7: 0xe000000000711ab0&lt;BR /&gt;  rsc:               0x1f&lt;BR /&gt;  bsp: 0x20000000678ffe38&lt;BR /&gt;bspst: 0x20000000678ffe38&lt;BR /&gt; rnat:                  0&lt;BR /&gt;  ccv:                  0&lt;BR /&gt; unat:                  0&lt;BR /&gt; fpsr:    0x9804c9a74433f&lt;BR /&gt;  pfs: 0xc00000000000091a&lt;BR /&gt;       (sor:0, sol:18, sof:26)&lt;BR /&gt;   lc:                  0&lt;BR /&gt;   ec:                  0&lt;BR /&gt;   ip: 0x6443470:0&lt;BR /&gt;  cfm:              0x91a&lt;BR /&gt;       (sor:0, sol:18, sof:26)&lt;BR /&gt;  psr:       0x6261636b75&lt;BR /&gt;(gdb)&lt;BR /&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/BLBN_RANKCOPYBUF&gt;&lt;/UNKNOWN_PROCEDURE&gt;&lt;/UNKNOWN_PROCEDURE&gt;&lt;/UNKNOWN_PROCEDURE&gt;&lt;/UNKNOWN_PROCEDURE&gt;</description>
      <pubDate>Thu, 14 Aug 2008 14:14:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251516#M687649</guid>
      <dc:creator>zorin09</dc:creator>
      <dc:date>2008-08-14T14:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: nulptr dereferences trap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251517#M687650</link>
      <description>&amp;gt;I can see in the code that it is trying to access a NULL pointer.&lt;BR /&gt;&lt;BR /&gt;It sure looks like it:&lt;BR /&gt;0x6443470:0 &lt;BLBN_RANKCOPYBUF&gt;: ld4 r8=[r8]&lt;BR /&gt; gr8: 0&lt;BR /&gt;&lt;BR /&gt;Are you sure you used chatr(1) on the executable and not some shared lib?&lt;/BLBN_RANKCOPYBUF&gt;</description>
      <pubDate>Thu, 14 Aug 2008 19:25:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251517#M687650</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-08-14T19:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: nulptr dereferences trap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251518#M687651</link>
      <description>Dennis I just want to make sure that you got my question right. &lt;BR /&gt;&lt;BR /&gt;What I don't understand is that even though the "nulptr dereferences trap" is disabled why the NULL pointer dereferencing is trapped on M1? Is there some kernel/environement level setting that is enabling the "nulptr dereferences trap". If I do chatr on the exe I see that "nulptr dereferences trap disabled"&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Aug 2008 19:34:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251518#M687651</guid>
      <dc:creator>zorin09</dc:creator>
      <dc:date>2008-08-14T19:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: nulptr dereferences trap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251519#M687652</link>
      <description>&amp;gt;What I don't understand is that even though the "nulptr dereferences trap" is disabled why the NULL pointer dereferencing is trapped on M1?&lt;BR /&gt;&lt;BR /&gt;This should be impossible.  In order to implement the -Z default, a special null pointer page is used by the kernel.  All processes with -Z share it.  And I would think it is impossible for a normal user to use mprotect(2) to change the permissions.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Is there some kernel/environment level setting that is enabling the "nulptr dereferences trap".&lt;BR /&gt;&lt;BR /&gt;Not that I know of.&lt;BR /&gt;Can you write a small test case that fails on M1?</description>
      <pubDate>Fri, 15 Aug 2008 00:05:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251519#M687652</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-08-15T00:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: nulptr dereferences trap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251520#M687653</link>
      <description>I can't run anything on M1. M1 is production box. I'm not allowed to touch it.</description>
      <pubDate>Fri, 15 Aug 2008 21:19:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251520#M687653</guid>
      <dc:creator>zorin09</dc:creator>
      <dc:date>2008-08-15T21:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: nulptr dereferences trap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251521#M687654</link>
      <description>&lt;P&gt;&amp;gt;I can't run anything on M1. I'm not allowed to touch it.&lt;BR /&gt;&lt;BR /&gt;I suppose you could contact the Response Center to see if they have heard about bogus errors with -Z?&lt;BR /&gt;Is this executable on a NFS mount?&lt;BR /&gt;&lt;BR /&gt;gr1: 0x90e1e08&lt;BR /&gt;&lt;BR /&gt;This isn't valid. GR1 must be a valid 64 bit pointer at all times.&amp;nbsp; And be 16 byte aligned.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2011 06:07:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nulptr-dereferences-trap/m-p/4251521#M687654</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-09-11T06:07:55Z</dc:date>
    </item>
  </channel>
</rss>

