 |
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: Sat Sep 23, 2006 1:41 pm
[1.07] A weird error, round 2 |
While the "#noop" bug might appear fixed, I have discovered that it has only hidden itself in a very weird manner.
#alias test {
#if (1=1) {#noop} {}
}
> test hello
Everything works fine. Good, so no bugs... However:
#alias test2 {
#if (1=1) {#noop} {}
// one
// two
// three
// four
}
> test2 hello
Stack frame corrupted . Those comments could also have been replaced with some #commands, e.g #noop/#echo and it would crash as well.
If you are extremely lucky it wont crash but might output zeros instead. |
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Sep 23, 2006 5:14 pm |
Verified. This is wierd. I thought I fixed this and can't imagine what it happening now. But I'll look into it on Monday and let you know what I find.
But thanks for report. Don't know how you find wierd stuff like this, but it's really helpful. |
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Sep 26, 2006 8:53 pm |
Looks like I've got this fixed now in v1.08. One of my routines for saving/restoring code buffers wasn't pushing the codestream onto the stack if the length was zero (like in the case of a null command or argument). And yet the Pop routine was always popping. So there was a mismatch between the Push and Pop causing the stack to get corrupted.
This bug probably happens in several cases causing a lot of the stack corrupted errors that people have been getting. |
|
|
|
 |
|
|
|