<?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 Error reading memory in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/error-reading-memory/m-p/4020934#M93541</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We are trying to migrate the application from HP 11.00 to ll.23i v2. We have compiled the code successfully. But during runtime, we are facing issues while reading the memory of a character pointer. Please find the below details and kindly help.&lt;BR /&gt;&lt;BR /&gt;char * UserProfId &lt;BR /&gt;&lt;BR /&gt;UserProfId = 0x1634 &lt;ERROR reading="" address=""&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please let me know in case you need any more information.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;nan&lt;BR /&gt;&lt;/ERROR&gt;</description>
    <pubDate>Fri, 15 Jun 2007 09:05:55 GMT</pubDate>
    <dc:creator>rajanandhini</dc:creator>
    <dc:date>2007-06-15T09:05:55Z</dc:date>
    <item>
      <title>Error reading memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-reading-memory/m-p/4020934#M93541</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We are trying to migrate the application from HP 11.00 to ll.23i v2. We have compiled the code successfully. But during runtime, we are facing issues while reading the memory of a character pointer. Please find the below details and kindly help.&lt;BR /&gt;&lt;BR /&gt;char * UserProfId &lt;BR /&gt;&lt;BR /&gt;UserProfId = 0x1634 &lt;ERROR reading="" address=""&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Please let me know in case you need any more information.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;nan&lt;BR /&gt;&lt;/ERROR&gt;</description>
      <pubDate>Fri, 15 Jun 2007 09:05:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-reading-memory/m-p/4020934#M93541</guid>
      <dc:creator>rajanandhini</dc:creator>
      <dc:date>2007-06-15T09:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error reading memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-reading-memory/m-p/4020935#M93542</link>
      <description>A lot more information, I'm afraid.&lt;BR /&gt;&lt;BR /&gt;First, are you really assigning a constant to this pointer and expecting that to just work? (It is almost certain not to).&lt;BR /&gt;&lt;BR /&gt;Assuming what you really meant above is that the pointer had this value at the time of the read [not that you assigned to it], then you have to determine where this address came from. Was it malloc'd? Returned via some other system call? Did you check for failure of said system call? Could this memory have been free'd and this pointer is stale?&lt;BR /&gt;&lt;BR /&gt;There's really no way to know what's happened from the information given -- and the odds are quite high that this s a programmatic error in the code which wasn't sufficient to halt compilation (there may be an interesting warning in some cases... it never hurts to go back through the compiler output and determine why you got any warnings you got).&lt;BR /&gt;&lt;BR /&gt;One other thought -- if you are also going from running on 32-bit kernels to 64-bit kernels, it would be worth checking that you aren't failing to include stdlib.h and casting the return value of malloc(). Doing that will cause malloc to be treated as returning an implicit int instead of the void * it really returns.</description>
      <pubDate>Fri, 15 Jun 2007 09:49:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-reading-memory/m-p/4020935#M93542</guid>
      <dc:creator>Don Morris_1</dc:creator>
      <dc:date>2007-06-15T09:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error reading memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-reading-memory/m-p/4020936#M93543</link>
      <description>Can you post the source that is throwing this error if it isn't too big. Because as stated before a pointer cannot be equated to an address, it can only point to one. Unless the code was equating a char pointer to a string of chars i.e. char *UserProfId = "0x1634". A little more explanation alongwith the source listing would be of much help in debugging this issue.&lt;BR /&gt;&lt;BR /&gt;~cheers</description>
      <pubDate>Fri, 15 Jun 2007 10:25:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-reading-memory/m-p/4020936#M93543</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-06-15T10:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error reading memory</title>
      <link>https://community.hpe.com/t5/operating-system-linux/error-reading-memory/m-p/4020937#M93544</link>
      <description>The value 0x1634 would be a perfectly valid pointer value on PA but not on IPF.  Pointers to rodata strings would start at 0x04000000.&lt;BR /&gt;&lt;BR /&gt;As mentioned by Don, you need to track where that value came from.  You could compile with +check=uninit.  You can also set a gdb watchpoint on it:&lt;BR /&gt;(gdb) watch UserProfId&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Sandman: Because as stated before a pointer cannot be equated to an address&lt;BR /&gt;&lt;BR /&gt;??  Why were you saying this?  This output is from gdb:&lt;BR /&gt;UserProfId = 0x1634 &lt;ERROR reading="" address=""&gt;&lt;/ERROR&gt;</description>
      <pubDate>Sat, 16 Jun 2007 00:35:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/error-reading-memory/m-p/4020937#M93544</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-06-16T00:35:45Z</dc:date>
    </item>
  </channel>
</rss>

