Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #5594

Re: Memory corruption problem

Path csiph.com!weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!border1.nntp.ams1.giganews.com!nntp.giganews.com!buffer1.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail
NNTP-Posting-Date Fri, 16 Nov 2018 09:22:23 -0600
From Martin <News03@avisoft.f9.co.uk>
Subject Re: Memory corruption problem
Newsgroups comp.sys.acorn.programmer
Date Fri, 16 Nov 2018 15:21:01 +0000 (GMT)
Message-ID <5757e90ea1News03@avisoft.f9.co.uk> (permalink)
References <2e86dd5757.Alan.Adams@ArmX6.adamshome.org.uk>
User-Agent Pluto/3.17k (RISC OS/5.24) NewsHound/v1.52-32
Organization None
Lines 55
X-Usenet-Provider http://www.giganews.com
X-Trace sv3-kLzHSU7uvv6BhEedPZpxIIo9AAWGKGE0nbAXFgEHJEOd13u5A2uFzPvaCYS/YhIx07auBhJIR0dbgXC!aafmllydXejgWIJjuQZoSEKrCy34NLAIKEkg0wgzFOPrB+GQbKd51qt9gB1QTPLycigyn3R6uecW!E94=
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 3353
Xref csiph.com comp.sys.acorn.programmer:5594

Show key headers only | View raw


On 16 Nov in article <2e86dd5757.Alan.Adams@ArmX6.adamshome.org.uk>,
   Alan Adams <alan@adamshome.org.uk> wrote:
> Hi

> I have a huge BASIC project which uses TCPIP networking. I am
> currently making some changes, and have hit a snag. Something seems
> to be corrupting system memory. The symptoms are that at
> apparently random times I get "file has been closed or handle is
> invalid", mainly from my programs but occasionally also from
> Messenger. Occasionally also the fonts get changed on the desktop,
> and shutdown produces "font not found".

> When I get "invalid handle" the handle value is still the one
> previous writes to the file have used.

> Hermes also occasionally reports a "network problem" which requires
> a reboot. While this might be due to runaway socket allocation,
> exhausting the supply, it also might indicate corruption of the
> areas pointed to, in the same way I suspect the areas referenced
> by file handles are being altered.

> It would help if I knew what areas of memory to look at after the 
> event - the things overwritten there (if that is indeed what is 
> happening) may tell me what part of my code is getting it wrong.

I cannot think how something that is changed within an application
wimpslot by that application could possibly cause any other
application problems.

However, if you use indirection operators !?$ it is possible that
something that *should* be within your wimpslot is not. It is
possible to validate write addresses?

If your applications use memory that is outside your slot (probably
RMA?) then overrunning a block, or writing to the wrong address, can
have predictable unpredictable results. Again, is it possible to
validate writes?

If an RMA block has more written than its size, you are likely to get
Heap errors at some time, but it depends on what and how much is
overwritten. Note that *ReportHeap always checks the validity of the
heap and reports any problems with the chains (see example HeapCheck
program). This can give some clues about an overrun problem before it
causes chaos.

The smaller the overwrite, the harder it can be to track down - but
yours sound larger to me.  However, remember that they could all be
caused by spurious SYS calls as well.

Martin

-- 
Martin Avison 
Note that unfortunately this email address will become invalid
without notice if (when) any spam is received. 

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Memory corruption problem Alan Adams <alan@adamshome.org.uk> - 2018-11-16 13:15 +0000
  Re: Memory corruption problem Martin <News03@avisoft.f9.co.uk> - 2018-11-16 15:21 +0000
    Re: Memory corruption problem Alan Adams <alan@adamshome.org.uk> - 2018-11-16 15:53 +0000
      Re: Memory corruption problem Martin <News03@avisoft.f9.co.uk> - 2018-11-16 20:04 +0000
        Re: Memory corruption problem Alan Adams <alan@adamshome.org.uk> - 2018-11-16 22:38 +0000
          Re: Memory corruption problem Martin <News03@avisoft.f9.co.uk> - 2018-11-16 23:46 +0000
  Re: Memory corruption problem David Buck <dbuckhome@gmail.com> - 2018-11-16 23:15 -0800
    Re: Memory corruption problem Alan Adams <alan@adamshome.org.uk> - 2018-11-17 12:21 +0000
      Re: Memory corruption problem Alan Adams <alan@adamshome.org.uk> - 2018-11-17 13:10 +0000
        Re: Memory corruption problem Martin <News03@avisoft.f9.co.uk> - 2018-11-17 19:01 +0000
          Re: Memory corruption problem Alan Adams <alan@adamshome.org.uk> - 2018-11-17 21:04 +0000
        Re: Memory corruption problem Erik G <noreply123@xs4all.nl> - 2018-11-24 20:17 +0100
    Re: Memory corruption problem "John Williams (News)" <UCEbin@tiscali.co.uk> - 2018-11-17 12:26 +0000
    Re: Memory corruption problem David Higton <dave@davehigton.me.uk> - 2018-11-17 20:59 +0000

csiph-web