<?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: malloc in thread in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-in-thread/m-p/2500225#M737643</link>
    <description>A signal in malloc is usually an indication of heap corruption.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;in the working thread&lt;BR /&gt;&lt;BR /&gt;The stack trace didn't go all the way back but if this is in a thread, it could be a thread stack overflow.</description>
    <pubDate>Sat, 01 Sep 2007 19:19:59 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2007-09-01T19:19:59Z</dc:date>
    <item>
      <title>malloc in thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-in-thread/m-p/2500224#M737642</link>
      <description>Hi.&lt;BR /&gt;&lt;BR /&gt;I hit a code dump problem in one of my running thread. In that thread function, I call some odbc function and hit the core dump when the odbc function try to allocate memory by using malloc. The stacktrace is sth. like:&lt;BR /&gt;&lt;BR /&gt;#0  0x75f450c8 in mallinfo () from /usr/lib/libc.2&lt;BR /&gt;#1  0x75f41ccc in malloc () from /usr/lib/libc.2&lt;BR /&gt;#2  0x75f29c7c in calloc () from /usr/lib/libc.2&lt;BR /&gt;#3  0x74b6c5f4 in nsbal ()&lt;BR /&gt;   from /local/app/oracle/product/8.1.5/lib/libclntsh.sl&lt;BR /&gt;#4  0x74b2e018 in nsprecv ()&lt;BR /&gt;   from /local/app/oracle/product/8.1.5/lib/libclntsh.sl&lt;BR /&gt;#5  0x74bad560 in nscon ()&lt;BR /&gt;   from /local/app/oracle/product/8.1.5/lib/libclntsh.sl&lt;BR /&gt;#6  0x74b6f1b0 in nsdo () from /local/app/oracle/product/8.1.5/lib/libclntsh.sl&lt;BR /&gt;#7  0x74bac90c in nscall3 ()&lt;BR /&gt;   from /local/app/oracle/product/8.1.5/lib/libclntsh.sl&lt;BR /&gt;#8  0x74babb10 in nscall ()&lt;BR /&gt;   from /local/app/oracle/product/8.1.5/lib/libclntsh.sl&lt;BR /&gt;#9  0x74b7fe8c in niotns ()&lt;BR /&gt;   from /local/app/oracle/product/8.1.5/lib/libclntsh.sl&lt;BR /&gt;#10 0x74b351e0 in nigcall ()&lt;BR /&gt;   from /local/app/oracle/product/8.1.5/lib/libclntsh.sl&lt;BR /&gt;#11 0x74b15338 in osncon ()&lt;BR /&gt;   from /local/app/oracle/product/8.1.5/lib/libclntsh.sl&lt;BR /&gt;#12 0x74a57190 in upiini ()&lt;BR /&gt;   from /local/app/oracle/product/8.1.5/lib/libclntsh.sl&lt;BR /&gt;#13 0x74a46b98 in upiah0 ()&lt;BR /&gt;   from /local/app/oracle/product/8.1.5/lib/libclntsh.sl&lt;BR /&gt;#14 0x74a20554 in kpuatch ()&lt;BR /&gt;   from /local/app/oracle/product/8.1.5/lib/libclntsh.sl&lt;BR /&gt;#15 0x74a3a1f8 in OCIServerAttach ()&lt;BR /&gt;   from /local/app/oracle/product/8.1.5/lib/libclntsh.sl&lt;BR /&gt;#16 0x75028120 in ?? () from /local1/odbc/3.60/lib/ivor815.sl&lt;BR /&gt;#17 0x7471776c in ?? () from /local1/odbc/3.60/lib/libivbas15.sl&lt;BR /&gt;#18 0x74714c3c in ?? () from /local1/odbc/3.60/lib/libivbas15.sl&lt;BR /&gt;Error accessing memory address 0x0: Invalid argument.&lt;BR /&gt;&lt;BR /&gt;My explanation is that: the malloc() call in the working thread is not allocating memory from heap instead from the thread stack?&lt;BR /&gt;Can you HP-UX expert explan to me?&lt;BR /&gt;&lt;BR /&gt;Thanks a lot!&lt;BR /&gt;&lt;BR /&gt;--ye&lt;BR /&gt;</description>
      <pubDate>Fri, 02 Mar 2001 02:43:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-in-thread/m-p/2500224#M737642</guid>
      <dc:creator>Ye Liu</dc:creator>
      <dc:date>2001-03-02T02:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: malloc in thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-in-thread/m-p/2500225#M737643</link>
      <description>A signal in malloc is usually an indication of heap corruption.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;in the working thread&lt;BR /&gt;&lt;BR /&gt;The stack trace didn't go all the way back but if this is in a thread, it could be a thread stack overflow.</description>
      <pubDate>Sat, 01 Sep 2007 19:19:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-in-thread/m-p/2500225#M737643</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-09-01T19:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: malloc in thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/malloc-in-thread/m-p/2500226#M737644</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;In more than 99% of cases you corrupted the heap head.&lt;BR /&gt;in 50% of the case it is when you malloc() a string of 1 byte less what it is needed, usually  malloc(strlen(mystring)) when it should be malloc(strlen(mystring)+1)&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Sep 2007 03:41:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/malloc-in-thread/m-p/2500226#M737644</guid>
      <dc:creator>Laurent Menase</dc:creator>
      <dc:date>2007-09-03T03:41:14Z</dc:date>
    </item>
  </channel>
</rss>

