Skip to content

Commit

Permalink
Update to the beta 53 sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
mistachkin committed Jun 7, 2023
1 parent d8041a1 commit d1c4577
Show file tree
Hide file tree
Showing 404 changed files with 54,995 additions and 21,976 deletions.
10 changes: 5 additions & 5 deletions Build/Components/Private/PatchLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,31 @@
///////////////////////////////////////////////////////////////////////////////

#if PATCHLEVEL
[assembly: AssemblyVersion("1.0.8369.11942")]
[assembly: AssemblyVersion("1.0.8503.24499")]
#endif

///////////////////////////////////////////////////////////////////////////////

#if ASSEMBLY_DATETIME
[assembly: AssemblyDateTime("2022.11.05T00:00:00.000 +0000")]
[assembly: AssemblyDateTime("2023.04.15T00:00:00.000 +0000")]
#endif

///////////////////////////////////////////////////////////////////////////////

#if ASSEMBLY_RELEASE
[assembly: AssemblyRelease("15th Anniversary Special Edition, Beta 52")]
[assembly: AssemblyRelease("Fire Dragon Series, Beta 53")]
#endif

///////////////////////////////////////////////////////////////////////////////

#if SOURCE_ID
[assembly: AssemblySourceId("4dd584fd50ffa2cbccc51cbf3dd1860160c5cce7")]
[assembly: AssemblySourceId("3408f6a4276cac14fcd30d0c0d9bc8afd3929c83")]
#endif

///////////////////////////////////////////////////////////////////////////////

#if SOURCE_TIMESTAMP
[assembly: AssemblySourceTimeStamp("2022-11-21 16:49:21 UTC")]
[assembly: AssemblySourceTimeStamp("2023-06-06 14:43:06 UTC")]
#endif

///////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion Build/Tasks/Script.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ ref Result error

code = Utility.FixupReturnValue(
interpreter, null, DefaultObjectFlags, null,
DefaultObjectOptionType, DefaultObjectName,
null, DefaultObjectOptionType, DefaultObjectName,
this, true, false, ref result);

if (code != ReturnCode.Ok)
Expand Down
159 changes: 159 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,165 @@

************************* Beta 1.0.XXXX.XXXXX RELEASE *************************

BUGFIX: fix and/or address Coverity issues from #300175 to #316072.

BUGFIX: prevent the built-in Diagnostic host from emitting one character at a
time when writing to its (standard channel) streams.

BUGFIX: empty strings should always return nothing from the [split] command.

BUGFIX: hashing script file contents that are not present on the file system
should refer to the originally read text, not line-ending translated
script text.

BUGFIX: when calling FixupReturnValue, always pass a brand new dictionary of
options for use by create aliases.

BUGFIX: the [incr] command should not allow argument values with non-integer
internal representations.

BUGFIX: fixes to the special "args" argument handling for the [nproc] command.

BUGFIX: fix to sub-directory deletion handling in the Utility.CleanupDirectory
method.

BUGFIX: add null checks to several type comparision methods of the MarshalOps
class.

BUGFIX: honor policy trace output truncation when using MaybeEmitPolicyTrace.

BUGFIX: the GetPackageRelativeFileName method needs to make sure global package
paths are initialized prior to using them.

BUGFIX: decouple plugin strong name verification from its evidence extraction.

BUGFIX: by default, do not keep the test trace listener log file stream open.

BUGFIX: fix pending script checks in the MaybeCancelBusyOrNot method, which
prevented ResetCancel methods from working properly in some cases.

REFACTOR: improve semantics / naming conventions used by the runtime detection
subsystem.

REFACTOR: robustify static initialization for created AppDomains.

REFACTOR: make the Interpreter.Create method retry attempts to fetch (and add)
instances within the global state. also, further robustify against
locking errors within the global state, e.g. track whether or not an
interpreter was actually added to the global state, etc.

REFACTOR: internal cleanup of methods supporting the IEntityManager interface,
including PrivateHas*, PrivateDoes*Exist, and PrivateRemove* methods.

REFACTOR: improve tracing of lock acquisition errors.

REFACTOR: make it possible to disable interactive input, which causes input to
be buffered for later use.

REFACTOR: enhance responsiveness of the status form closing / disposal logic.

REFACTOR: add preliminary support for "kit" packages within the core library.

REFACTOR: add Engine.QueueWorkItem method overload that supports a ThreadStart
parameter type.

REFACTOR: add Engine.ExternalExecuteWithFrame method overload that makes all of
its flags arguments optional, pulling their values from the specified
interpreter when necessary.

REFACTOR: improve performance of creating interpreters when using the built-in
lists of commands, functions, etc.

REFACTOR: add experimental cache for StringBuilder instances used within the
core library.

REFACTOR: allow opaque object handles for the connection and/or transaction to
be used by the [sql execute] sub-command.

REFACTOR: *BREAKING CHANGE* for consistency, rename AsynchronousBridge class to
AsynchronousCallbackBridge.

REFACTOR: *BREAKING CHANGE* remove the Verbose plugin flag.

REFACTOR: *BREAKING CHANGE* improve formatting of CommandLogEntry lines.

REFACTOR: *BREAKING CHANGE* modify RestoreCorePlugin and RestoreMonitorPlugin
methods to require an additional boolean parameter.

REFACTOR: *BREAKING CHANGE* the [list] command is no longer included in the
subset required by the license SDK.

FEATURE: add ProvideEntropy property to the IInterpreter interface. when set,
it will be used to supply entropy to the interpreter instead of its
associated RandomNumberGenerator instance.

FEATURE: add -setall option to the [exec] command. when used, it forces all
captured values to be set into their associated variables even if an
error occurs.

FEATURE: add the ForceTrustedHashes environment variable to work around issues
with native X509 certificate trust checking.

FEATURE: add the PrepareInterpreterCallback and InitializeInterpreterCallback
static callback properties to the Interpreter class.

FEATURE: add WebTransferCallback property that allows the web download / upload
functionality for an interpreter to be customized.

FEATURE: add -logflags option to the [debug trace] sub-command.

FEATURE: add the [xml foreach] sub-command to iterate over a set of (matching?)
XML nodes.

FEATURE: add -anythread and -needclientdata options to the [load] command.

FEATURE: add RemoveCommands method and MaybeRename* methods to IEntityManager
interface.

FEATURE: add MergeTrusted* methods to the ITrustManager interface.

FEATURE: add CreateStateFlags property to the IInterpreter interface.

FEATURE: add GetVariableViaResolversWithSplit method to the IResolveManager
interface.

FEATURE: support extracting the unique identifier for a script from its text.

FEATURE: add two RemoveCommands method overloads to IEntityManager interface.

FEATURE: add ClearInterpreterForSettings, GetManagedExecutableName, HashBytes,
ComparePathParts, GetPackageScanCommand, VersionCompare, IsUnderPath,
GetPeFileDateTime, ConsoleKeyboardString, AppDomainIsStoppingSoon,
DoesTokenInterpreterExist, SetOfflineMode, ExtractZipFileToDirectory,
InOfflineMode, ClearInterpreterForSettings, IsInteractive, GetVersion,
GetOperatingSystemNameAndVersion, and GetRuntimeNameAndVersion methods
to the Utility class.

FEATURE: add [uri get] and [uri post] sub-commands, which work almost the same
as the [uri download] and [uri upload] sub-commands, except that their
use also implies the -inline option, which can now be disabled via the
new -noinline option.

FEATURE: add [interp iterationlimit] sub-command in order to limit the number
of iterations allowed for loops.

FEATURE: add -all option to the [interp rename] sub-command.

FEATURE: add [napply] command that works like [apply], but requires the use of
named arguments.

FEATURE: *BREAKING CHANGE* allow the [uri get], [uri post], and [uri isvalid]
sub-commands from within "safe" interpreters as long as URI argument
is considered trusted.

FEATURE: *BREAKING CHANGE* add ResetHistory method to the IHost interface and
the -history option to the [host reset] sub-command.

FEATURE: *BREAKING CHANGE* add the FindFlags and LoadFlags properties to the
InterpreterSettings class.

************************* Beta 1.0.8369.11942 RELEASE *************************

BUGFIX: fix and/or address Coverity issues from #283423 to #299487.

BUGFIX: correct argument synchronization in core shell support, including in
Expand Down
4 changes: 2 additions & 2 deletions Example/Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ internal static class Program
/// The random number generator used by the example command execution
/// policy for making "random" policy decisions.
/// </summary>
private static Random random;
private static Random random; /* EXEMPT */
#endregion

///////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -354,7 +354,7 @@ ref Result result /* out */
// decisions.
//
if (random == null)
random = new Random();
random = new Random(); /* EXEMPT */

//
// NOTE: Get a random integer; even numbers result in a
Expand Down
10 changes: 5 additions & 5 deletions Installer/Components/Private/PatchLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,31 @@
///////////////////////////////////////////////////////////////////////////////

#if PATCHLEVEL
[assembly: AssemblyVersion("1.0.8369.11942")]
[assembly: AssemblyVersion("1.0.8503.24499")]
#endif

///////////////////////////////////////////////////////////////////////////////

#if ASSEMBLY_DATETIME
[assembly: AssemblyDateTime("2022.11.05T00:00:00.000 +0000")]
[assembly: AssemblyDateTime("2023.04.15T00:00:00.000 +0000")]
#endif

///////////////////////////////////////////////////////////////////////////////

#if ASSEMBLY_RELEASE
[assembly: AssemblyRelease("15th Anniversary Special Edition, Beta 52")]
[assembly: AssemblyRelease("Fire Dragon Series, Beta 53")]
#endif

///////////////////////////////////////////////////////////////////////////////

#if SOURCE_ID
[assembly: AssemblySourceId("4dd584fd50ffa2cbccc51cbf3dd1860160c5cce7")]
[assembly: AssemblySourceId("3408f6a4276cac14fcd30d0c0d9bc8afd3929c83")]
#endif

///////////////////////////////////////////////////////////////////////////////

#if SOURCE_TIMESTAMP
[assembly: AssemblySourceTimeStamp("2022-11-21 16:49:21 UTC")]
[assembly: AssemblySourceTimeStamp("2023-06-06 14:43:06 UTC")]
#endif

///////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion Library/Commands/Alias.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ ref Result result
// NOTE: The command is being deleted. Delete the alias
// as well.
//
code = interpreter.RemoveAlias(
code = interpreter.InternalRemoveAlias(
nameToken, clientData, ref result);
}
else
Expand Down
25 changes: 17 additions & 8 deletions Library/Commands/Apply.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ ref Result result

if (code == ReturnCode.Ok)
{
//
// HACK: This name is needed for several error messages, see below.
//
string name = NextName(interpreter, @namespace);

//
// NOTE: We *MUST* have the formal arguments in an actual ArgumentList
// container now. The variadic and optional argument semantics
Expand All @@ -182,7 +187,6 @@ ref Result result
((argumentCount - 2) <= totalArgs)) ||
(hasArgs && ((argumentCount - 2) >= (totalArgs - optionalArgs))))
{
string name = NextName(interpreter, @namespace);
ICallFrame frame = null;

try
Expand All @@ -191,15 +195,17 @@ ref Result result
name, CallFrameFlags.Procedure | CallFrameFlags.Lambda,
new ClientData(hashValue), this, arguments);

VariableDictionary variables = frame.Variables;
StringDictionary alreadySet = new StringDictionary();
ArgumentList frameProcedureArguments = new ArgumentList();

frame.ProcedureArguments = new ArgumentList(arguments[0]);
frameProcedureArguments.Add(arguments[0]);
frame.ProcedureArguments = frameProcedureArguments;

for (int argumentIndex = 0; argumentIndex < formalArguments.Count; argumentIndex++)
{
string varName = formalArguments[argumentIndex].Name;

if (!variables.ContainsKey(varName))
if (!alreadySet.ContainsKey(varName))
{
ArgumentFlags flags = ArgumentFlags.None;
object varValue;
Expand All @@ -209,7 +215,7 @@ ref Result result
//
// NOTE: This argument is part of an argument list.
//
flags |= ArgumentFlags.ArgumentList;
flags |= ArgumentFlags.List;

//
// NOTE: Build the list for the final formal argument value,
Expand Down Expand Up @@ -278,14 +284,16 @@ ref Result result
//
if (varValue is Argument)
{
frame.ProcedureArguments.Add((Argument)varValue);
frameProcedureArguments.Add((Argument)varValue);
}
else
{
frame.ProcedureArguments.Add(Argument.GetOrCreate(
frameProcedureArguments.Add(Argument.GetOrCreate(
interpreter, flags, varName, varValue,
interpreter.HasNoCacheArgument()));
}

alreadySet.Add(varName, null);
}
}

Expand Down Expand Up @@ -314,7 +322,8 @@ ref Result result
{
interpreter.ReturnCode = ReturnCode.Ok;

code = interpreter.EvaluateScript(lambdaExpr[1], arguments[1], ref result);
code = interpreter.EvaluateScript(
lambdaExpr[1], (IScriptLocation)arguments[1], ref result);

#if DEBUGGER && DEBUGGER_EXECUTE
if (DebuggerOps.CanHitBreakpoints(interpreter,
Expand Down
4 changes: 3 additions & 1 deletion Library/Commands/Array.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1610,7 +1610,9 @@ ref Result result
if (strict || (arrayValue.Count > 0))
{
string name = arrayValue.GetRandom(
interpreter.RandomNumberGenerator, ref result);
interpreter.InternalProvideEntropy,
interpreter.RandomNumberGenerator,
ref result);

if (name != null)
{
Expand Down
2 changes: 1 addition & 1 deletion Library/Commands/Callback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ ref Result result

code = MarshalOps.FixupReturnValue(
interpreter, interpreter.InternalBinder, interpreter.InternalCultureInfo,
returnType, objectFlags, ObjectOps.GetInvokeOptions(
returnType, objectFlags, options, ObjectOps.GetInvokeOptions(
objectOptionType), objectOptionType, objectName, interpName,
callback, create, dispose, alias, aliasReference, toString,
ref result);
Expand Down
Loading

0 comments on commit d1c4577

Please sign in to comment.