Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#616 fix possible stack overflow in interpreter

open-fixed
nobody
Program (402)
5
2008-03-09
2008-02-06
Bert Wesarg
No

the check for stack overflow in pushSymVal() should be done before writing to the stack

Discussion

1 2 > >> (Page 1 of 2)
  • Bert Wesarg
    Bert Wesarg
    2008-02-06

    Logged In: YES
    user_id=122956
    Originator: YES

    there where some more handcrafted stack pops/pushs including one more with the check after the assigment. this patch converts these to use the POP/PUSH macros and do some style clean ups.

    File Added: fix-stack-overflow-check.patch

     
  • Tony Balinski
    Tony Balinski
    2008-02-06

    Logged In: YES
    user_id=618141
    Originator: NO

    Nicely done.

     
  • Bert Wesarg
    Bert Wesarg
    2008-02-07

    Logged In: YES
    user_id=122956
    Originator: YES

    updated patch: move variable declaration in front of code
    File Added: fix-stack-overflow-check.patch

     
  • Bert Wesarg
    Bert Wesarg
    2008-02-07

    Logged In: YES
    user_id=122956
    Originator: YES

    follow-up patch: refactor PUSH/POP/PEEK macros

    use 'do {} while(0)' for these macros, that means add a ';' after all calls

    because this touches almost all functions, I haven't done code style fixes
    File Added: interpret-macro-cleanup.patch

     
  • Bert Wesarg
    Bert Wesarg
    2008-02-07

    Logged In: YES
    user_id=122956
    Originator: YES

    follow-up patch updated: make it compile and remove variable shadowing

    File Added: interpret-macro-cleanup.patch

     
  • Bert Wesarg
    Bert Wesarg
    2008-02-07

    Logged In: YES
    user_id=122956
    Originator: YES

    sorry forget to refresh the actual patch file
    File Added: interpret-macro-cleanup.patch

     
  • Bert Wesarg
    Bert Wesarg
    2008-02-21

    Logged In: YES
    user_id=122956
    Originator: YES

    follow-up patch updated: the StringToNumberMsg now includes a '%s' to print the string that was tried to convert to a number (this was actually found in the Patch Collection)
    File Added: interpret-macro-cleanup.patch

     
  • Scott Tringali
    Scott Tringali
    2008-02-21

    Logged In: YES
    user_id=11321
    Originator: NO

    Good stuff here. I added you as a developer, I hope it's easier to update/commit changes directly than write patches.

     
  • Bert Wesarg
    Bert Wesarg
    2008-03-01

    Logged In: YES
    user_id=122956
    Originator: YES

    Ok, I committed the actual bug fix. for the clean-up of the stack macros (ie the follow-up patch) I like to get an ACK, at least from tony, because he do most inside interpret.c and this will break some of his patches, because of the needed ';' after all stack macros.

    I attached an updated patch.

    File Added: interpret-macro-cleanup.patch

     
  • Thorsten Haude
    Thorsten Haude
    2008-03-09

    • status: open --> closed-fixed
     
  • Thorsten Haude
    Thorsten Haude
    2008-03-09

    Logged In: YES
    user_id=119143
    Originator: NO

    So I assume that this is fixed.

     
  • Bert Wesarg
    Bert Wesarg
    2008-03-09

    Logged In: YES
    user_id=122956
    Originator: YES

    I leaved it open for the ReleaseNotes

    I will handle the cleanup patch outside of this bug report

     
  • Thorsten Haude
    Thorsten Haude
    2008-03-09

    • status: closed-fixed --> open-fixed
     
  • Thorsten Haude
    Thorsten Haude
    2008-03-09

    Logged In: YES
    user_id=119143
    Originator: NO

    I never checked, I assumed that you already changed ReleaseNotes.

     
  • Bert Wesarg
    Bert Wesarg
    2008-03-09

    Logged In: YES
    user_id=122956
    Originator: YES

    nope, I didn't should I, or do we do this in a bigger hunk?

     
  • Thorsten Haude
    Thorsten Haude
    2008-03-09

    Logged In: YES
    user_id=119143
    Originator: NO

    During the Big Beef someone pointed out that I did three feature commits without stating the SF patch number in the commit messages. After that I added the $NEXT_VERSION section and add my comment immediately or in a small batch for a group of recent patches. I don't see a downside.

     
  • Bert Wesarg
    Bert Wesarg
    2008-03-09

    Logged In: YES
    user_id=122956
    Originator: YES

    Ok

    BTW for this and other bugs I found, I posted the patch first to the list, than after a while (without response) I put it in the tracker. Now that I have write access, I would skip the SF entry and commit it directly, with a good commit message. I don't think that such bugs (found by a developer) should be in the ReleaseNoters

     
1 2 > >> (Page 1 of 2)