[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gforth] [bug #52085] Invalid memory address error in valid code. Eq
From: |
Anton Ertl |
Subject: |
[Bug-gforth] [bug #52085] Invalid memory address error in valid code. Equivalent code has no error. |
Date: |
Sun, 1 Oct 2017 07:08:59 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.5.0 |
Update of bug #52085 (project gforth):
Status: None => Invalid
Assigned to: None => anton
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
I could reproduce the problem. This is a bug in rin.fth (also in rin2.fth and
rin3.fth, but there the bug does not lead to a crash). The problem is that
PAD points to a little behind HERE, and code is compiled at HERE, moving HERE
and PAD, but not the former PAD stored in IO. What happens in rin.fth is that
the READ-FILE overwrites the ";S" compiled by the ";" in RIN. You can check
by doing a SIMPLE-SEE RIN before and after the call to RIN.
Fix: Use the address returned by PAD directly. It is only valid until HERE
changes (e.g., by compilation, ALLOT, or ",").
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52085>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gforth] [bug #52085] Invalid memory address error in valid code. Equivalent code has no error.,
Anton Ertl <=