<?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 Segmentation Fault in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/segmentation-fault/m-p/4024408#M93628</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would like to know some info regarding segmentation fault. We are migrating our old PA-RISC architectured server to a new IPF architecture. We have compiled the codes and when we execute the codes, we get some errors. On debugging, we found that the system was throwing segmentation fault. Also, each time we debugged the code, we got this segmentation fault at a different step.i.e. The first time we got it in line number 5 and the second time when we tried to debug the same, we got the error in some other line number, say 15. We are stuck here and any help in this regard will be greatly appreciated. Please let me know in case any more details are required.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;nan</description>
    <pubDate>Thu, 21 Jun 2007 10:51:41 GMT</pubDate>
    <dc:creator>rajanandhini</dc:creator>
    <dc:date>2007-06-21T10:51:41Z</dc:date>
    <item>
      <title>Segmentation Fault</title>
      <link>https://community.hpe.com/t5/operating-system-linux/segmentation-fault/m-p/4024408#M93628</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would like to know some info regarding segmentation fault. We are migrating our old PA-RISC architectured server to a new IPF architecture. We have compiled the codes and when we execute the codes, we get some errors. On debugging, we found that the system was throwing segmentation fault. Also, each time we debugged the code, we got this segmentation fault at a different step.i.e. The first time we got it in line number 5 and the second time when we tried to debug the same, we got the error in some other line number, say 15. We are stuck here and any help in this regard will be greatly appreciated. Please let me know in case any more details are required.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;nan</description>
      <pubDate>Thu, 21 Jun 2007 10:51:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/segmentation-fault/m-p/4024408#M93628</guid>
      <dc:creator>rajanandhini</dc:creator>
      <dc:date>2007-06-21T10:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Segmentation Fault</title>
      <link>https://community.hpe.com/t5/operating-system-linux/segmentation-fault/m-p/4024409#M93629</link>
      <description>It's hard to say much without seeing line 5,&lt;BR /&gt;or 15, and the rest of the code.  Many&lt;BR /&gt;problems are possible, like storing pointers&lt;BR /&gt;in 32-bit integers, which works much better&lt;BR /&gt;with 32-bit pointers than it does with 64-bit&lt;BR /&gt;pointers, for example.</description>
      <pubDate>Thu, 21 Jun 2007 11:11:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/segmentation-fault/m-p/4024409#M93629</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-06-21T11:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Segmentation Fault</title>
      <link>https://community.hpe.com/t5/operating-system-linux/segmentation-fault/m-p/4024410#M93630</link>
      <description>Segmentation fault is a SIGSEGV signal from the OS to the process. In the general sense, this is sent on an attempted access to a virtual address which is not considered valid for the process by the kernel (can be untranslated, outside architectural bounds, invalid permissions, etc.)&lt;BR /&gt;&lt;BR /&gt;Unfortunately for you -- that means that you're asking about the most common signal that programming bugs can generate. [You can get this from not checking the return of malloc(), trying to use an uninitialized pointer, accessing a pointer whose value was passed to free(), growing the stack beyond the limits, failing to grow the register stack, etc. etc.]&lt;BR /&gt;&lt;BR /&gt;So... my question would be: What are lines 5 and 15 _doing_? If they're accessing dynamic memory, have you tried monitoring the pointer to and values within that memory [to ensure that it isn't freed by another thread in the application?] If this is MT code, race conditions can easily give you different results on different runs...&lt;BR /&gt;&lt;BR /&gt;But in general -- this is Magic 8 Ball stuff.&lt;BR /&gt;Either show some code -- or pay very close attention in the debugger as to what's being accessed via what addresses, etc.</description>
      <pubDate>Thu, 21 Jun 2007 11:19:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/segmentation-fault/m-p/4024410#M93630</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2007-06-21T11:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Segmentation Fault</title>
      <link>https://community.hpe.com/t5/operating-system-linux/segmentation-fault/m-p/4024411#M93631</link>
      <description>Have you compiled with -g?  Are you optimizing?  Are you using threads and have a thread stack overflow?  (This will look very random!)&lt;BR /&gt;Have you compiled with +check=uninit and +check=bounds&lt;BR /&gt;&lt;BR /&gt;As the others have asked, what are on those lines?&lt;BR /&gt;&lt;BR /&gt;Of course you can always debug at the machine level after you abort:&lt;BR /&gt;(gdb) bt&lt;BR /&gt;(gdb) info reg&lt;BR /&gt;(gdb) disas $pc-16*20 $pc+16*4&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Jun 2007 02:40:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/segmentation-fault/m-p/4024411#M93631</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-06-22T02:40:59Z</dc:date>
    </item>
  </channel>
</rss>

