• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • FMSLogo
  • Bugs
FMSLogo

Full Test Pass shows memory corruption at SLOWDRAWTEST

A Logo programming environment for Microsoft Windows

Brought to you by: david_costanzo
  • Summary
  • Files
  • Reviews
  • Support
  • Tickets ▾
    • Feature Requests
    • Bugs
    • Support Requests
  • Discussion
  • Code
Menu ▾ ▴
  • Create Ticket
  • View Stats

Group

  • v_6.06x
  • v_6.07.X
  • v_6.08.X
  • v_6.10.X
  • v_6.11.X
  • v_6.13.X
  • v_6.22.X
  • v_6.25.X
  • v_6.26.X
  • v_6.27.X
  • v_6.28.X
  • v_6.29.X

Searches

  • Changes
  • Closed Tickets
  • Open Tickets

Help

  • Formatting Help

#307 Full Test Pass shows memory corruption at SLOWDRAWTEST

v_6.15.X
closed-fixed
David Costanzo
Language Engine (245)
5
2012-08-27
2008-02-17
David Costanzo
No

For the past several releases, there has been some memory corruption when running the SLOWDRAWTEST. I investigated this once and tracked the corruption down to this line in SIMPLEREPORTTEST (testlib.lgo):

LOCALMAKE "lasterror ERROR

It was overwritten with this:

LOCALMAK\>€®\

How Reproducible:
Every Time

Steps to Reproduce:
1) Start FMSLogo.exe
2) Load src\test\testharness.lgo
3) Run through the test pass

What Happens:
When it comes time to run SLOWDRAWTEST.REDEFPTEST, there's a strange failure like:

I don't know how to ®

Expected Result:
The test pass runs to completion. Individual tests may have failed due to known bugs.

Discussion

  • David Costanzo

    David Costanzo - 2012-08-27

    While porting FMSLogo to wxWidgets, I found that the debug version crashed every time that NETWORKTEST was run. Upon investigation, it looks like this was a race condition between NETACCEPTON/NETCONNECTON and NETWORKSHUTDOWN when asynchronous DNS was used. The problem is that the HOSTENT structure which NETACCEPTON/NETCONNECTON allocates gets freed in NETWORKSHUTDOWN. Although this calls WSACleanup, that is apparently not sufficient to stop any asynchronous calls in progress, which means that the call to WSAAsyncGetHostByName() might still attempt to write into the memory after it is freed. This results in random memory corruption, which, in the case cited in the bug description, manifests itself as corrupted definitions in the next test.

    I have checked in a fix for this that uses a static buffer for HOSTENT, instead of dynamically allocated memory. This is an easy fix that side-steps the problem by simply not freeing the memory which WSAAsyncGetHostByName() might want to write into. It's not an ideal fix, though, since it adds 8K of static memory, even for sessions which don't use the networking API (which is nearly all sessions).

    I have confirmed that this fix addresses the problem in the wxWidgets port and I was able to run the entire regression test suite to completion on Windows 95, something that I haven't been able to do since the network tests were added.

     
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
  • David Costanzo

    David Costanzo - 2012-08-27
    • status: open --> closed-fixed
     
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
  • David Costanzo

    David Costanzo - 2012-08-27

    The fix will be available in FMSLogo 6.29.0.

     
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:

Log in to post a comment.

SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    1320 Columbia Street Suite 310
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2026 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
mdb logo