In the following example test.py, we define two classes A and B. If we change 'bases' in issubclass, ironpython crashes
test.py:
class A:
@property
def __bases__(self):
return (self,)
class B:
@property
def __bases__(self):
return (A(),)
assert issubclass(B(), int) #crash
Error message:
>>'ironpython/ironpython3/bin/Debug/net6.0/ipy' test.py
...
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Microsoft.Scripting.Runtime.Scope)
at IronPython.Compiler.RuntimeScriptCode.Run(Microsoft.Scripting.Runtime.Scope)
at IronPython.Hosting.PythonCommandLine.RunFileWorker(System.String)
at IronPython.Hosting.PythonCommandLine.RunFile(System.String)
at Microsoft.Scripting.Hosting.Shell.CommandLine.Run()
at IronPython.Hosting.PythonCommandLine.Run()
at Microsoft.Scripting.Hosting.Shell.CommandLine.Run(Microsoft.Scripting.Hosting.ScriptEngine, Microsoft.Scripting.Hosting.Shell.IConsole, Microsoft.Scripting.Hosting.Shell.ConsoleOptions)
at Microsoft.Scripting.Hosting.Shell.ConsoleHost.RunCommandLine()
at Microsoft.Scripting.Hosting.Shell.ConsoleHost.ExecuteInternal()
at PythonConsoleHost.ExecuteInternal()
at Microsoft.Scripting.Hosting.Shell.ConsoleHost.Execute()
at Microsoft.Scripting.Hosting.Shell.ConsoleHost.Run(System.String[])
at PythonConsoleHost.Main(System.String[])
Aborted (core dumped)
System info:
ironpython3-debug(main branch):IronPython 3.4.0b1 DEBUG (3.4.0.0010)[.NETCoreApp,Version=v6.0 on .NET 6.0.11 (64-bit)] on linux
operating system: Ubuntu 18.04.6 LTS
In the following example test.py, we define two classes A and B. If we change 'bases' in issubclass, ironpython crashes
test.py:
Error message:
System info: ironpython3-debug(main branch):IronPython 3.4.0b1 DEBUG (3.4.0.0010)[.NETCoreApp,Version=v6.0 on .NET 6.0.11 (64-bit)] on linux operating system: Ubuntu 18.04.6 LTS