Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: 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 Rolling Eyes. 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.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net