Home My Page Projects Code Snippets Project Openings SML/NJ Bugs
Summary Activity Tracker Lists

[#127] Crash on windows with OS.Process.system

Date:
2014-06-27 21:18
Priority:
3
State:
Closed
Submitted by:
Bug Submitter (webuser)
Assigned to:
John Reppy (jhr)
Machine Architecture:
x86
Operating System:
Windows 7
Component:
Basis Library
Resolution:
Fixed
Severity:
Minor
OS Version:
Windows 7, 64 bit
SML/NJ Version:
v110.76
Keywords:
windows system
URL:
Transcript (of reproduction):
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\ravC:/Program Files (x86)/smlnj/bin/sml.bat Standard ML of New Jersey v110.76 [built: Sun Jul 14 09:59:19 2013] - OS.Process.system otepad ; [autoloading] [library $SMLNJ-BASIS/basis.cm is stable] [autoloading done] val it = 0wx0 : Word32.word - OS.Process.system otepad ; val it = 0wx0 : Word32.word - (* 14 characters = crash*) - OS.Process.system otepad ; = CRASH C:\Users\rav
Source (for reproduction):
OS.Process.system otepad ; OS.Process.system otepad ; (* 14 characters = crash*) OS.Process.system otepad ;
Summary:
Crash on windows with OS.Process.system

Detailed description
When calling OS.Process.system \\\la bla\\\ where the length
of the string is equal to 14 + n * 8 (n=0) smlnj crashes (6 characters no crash).
Windows pops up a dialog which tells me :
run.x86-win32.exe has stopped working
with the three options:
* Check online ...
* Close the program
* Debug the program

If using the Debugger VS 2010 the exception is
sometimes a \\\heap corruption\\\ and somtimes an \\\access violation\\\.
In the case of a \\\heap corruption\\\ it is possible to continue the program.

The crash is not always triggered. But I am able to reproduce it reliable
with a fresh process.
I first encountered the crash with much larger strings (230,174,182 ...) where
the commadline contained arguments for the called program.

Is this a problem of appending a 0 to the commandline string but not accounting
for the increased size?
Additional comments:
While trying to submit the bug:
I do not see the captcha with Google Chrome.
the captcha is accessed with http instead of https

Is the SourceForge SMLNJ-Dev-List still active?

Submitted via web form by Roland Averkamp roland.averkamp.0@gmail.com

Comments:

Message  ↓
Date: 2014-07-30 18:12
Sender: John Reppy

It was an off-by-one error in the runtime. Fixed for 110.77.

Attached Files:

Changes

Field Old Value Date By
status_idOpen2014-07-30 18:12jhr
close_date2014-07-30 18:122014-07-30 18:12jhr
ResolutionNone2014-07-30 18:12jhr
Operating SystemWindows Vista2014-06-27 22:54jhr
assigned_tonone2014-06-27 22:48jhr