Title: Stack overflow analyzing script snippets · Issue #2056 · PowerShell/PSScriptAnalyzer · GitHub
Open Graph Title: Stack overflow analyzing script snippets · Issue #2056 · PowerShell/PSScriptAnalyzer
X Title: Stack overflow analyzing script snippets · Issue #2056 · PowerShell/PSScriptAnalyzer
Description: This afternoon I was writing a inline PowerShell script in a GitHub Actions workflow whose intention is to lint the usage of PowerShell in GitHub Actions workflows (♾), and while testing it locally with a slightly modified version I foun...
Open Graph Description: This afternoon I was writing a inline PowerShell script in a GitHub Actions workflow whose intention is to lint the usage of PowerShell in GitHub Actions workflows (♾), and while testing it locally...
X Description: This afternoon I was writing a inline PowerShell script in a GitHub Actions workflow whose intention is to lint the usage of PowerShell in GitHub Actions workflows (♾), and while testing it locally...
Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/issues/2056
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Stack overflow analyzing script snippets","articleBody":"This afternoon I was writing a inline PowerShell script in a GitHub Actions workflow whose intention is to lint the usage of PowerShell in GitHub Actions workflows (♾), and while testing it locally with a slightly modified version I found I hit a stack overflow that terminated my pwsh session in Windows Terminal.\n\nI can't reproduce it in GitHub Actions itself for some reason, but I can on my own laptop.\n\nSteps to reproduce\n------------------\n\n1. Clone https://github.com/martincostello/github-automation/commit/5563b3cf300d4931704249525361f5cd510255d3\n2. Run `lint.ps1`\n\nExpected behavior\n-----------------\n\nThe script runs successfully.\n\nActual behavior\n---------------\n\n```none\nLinting actions/dotnet-release/action.yml...\nLinting actions/dotnet-upgrade-report/action.yml...\nLinting actions/dotnet-version-report/action.yml...\nLinting actions/get-dotnet-repos/action.yml...\nLinting actions/get-rebase-repos/action.yml...\nLinting actions/get-sdk-repos/action.yml...\nLinting actions/is-dotnet-change-available/action.yml...\nLinting actions/lint-workflow-powershell/action.yml...\nLinting .github/workflows/acr-housekeeping.yml...\nStack overflow.\nRepeated 252 times:\n--------------------------------\n at System.Reflection.RuntimeAssembly.\u003cInternalLoad>g____PInvoke|49_0(System.Reflection.NativeAssemblyNameParts*, System.Runtime.CompilerServices.ObjectHandleOnStack, System.Runtime.CompilerServices.StackCrawlMarkHandle, Int32, System.Runtime.CompilerServices.ObjectHandleOnStack, System.Runtime.CompilerServices.ObjectHandleOnStack)\n at System.Reflection.RuntimeAssembly.InternalLoad(System.Reflection.AssemblyName, System.Threading.StackCrawlMark ByRef, System.Runtime.Loader.AssemblyLoadContext, System.Reflection.RuntimeAssembly, Boolean)\n at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(System.Reflection.Assembly, System.Globalization.CultureInfo, System.Version, Boolean)\n at System.Resources.ManifestBasedResourceGroveler.InternalGetSatelliteAssembly(System.Reflection.Assembly, System.Globalization.CultureInfo, System.Version)\n at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(System.Globalization.CultureInfo)\n at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(System.Globalization.CultureInfo, System.Collections.Generic.Dictionary`2\u003cSystem.String,System.Resources.ResourceSet>, Boolean, Boolean)\n at System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo, Boolean, Boolean)\n at System.Resources.ResourceManager.GetString(System.String, System.Globalization.CultureInfo)\n at System.Management.Automation.ErrorCategoryInfo.Ellipsize(System.Globalization.CultureInfo, System.String)\n at System.Management.Automation.ScriptBlock.GetContextFromTLS()\n at System.Management.Automation.ScriptBlock.InvokeAsDelegateHelper(System.Object, System.Object, System.Object[])\n at DynamicClass.lambda_method523(System.Runtime.CompilerServices.Closure, System.Object, System.ResolveEventArgs)\n at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(System.ResolveEventHandler, System.Reflection.RuntimeAssembly, System.String)\n at System.Reflection.RuntimeAssembly.\u003cInternalLoad>g____PInvoke|49_0(System.Reflection.NativeAssemblyNameParts*, System.Runtime.CompilerServices.ObjectHandleOnStack, System.Runtime.CompilerServices.StackCrawlMarkHandle, Int32, System.Runtime.CompilerServices.ObjectHandleOnStack, System.Runtime.CompilerServices.ObjectHandleOnStack)\n--------------------------------\n at System.Reflection.RuntimeAssembly.\u003cInternalLoad>g____PInvoke|49_0(System.Reflection.NativeAssemblyNameParts*, System.Runtime.CompilerServices.ObjectHandleOnStack, System.Runtime.CompilerServices.StackCrawlMarkHandle, Int32, System.Runtime.CompilerServices.ObjectHandleOnStack, System.Runtime.CompilerServices.ObjectHandleOnStack)\n at System.Reflection.RuntimeAssembly.InternalLoad(System.Reflection.AssemblyName, System.Threading.StackCrawlMark ByRef, System.Runtime.Loader.AssemblyLoadContext, System.Reflection.RuntimeAssembly, Boolean)\n at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(System.Reflection.Assembly, System.Globalization.CultureInfo, System.Version, Boolean)\n at System.Resources.ManifestBasedResourceGroveler.InternalGetSatelliteAssembly(System.Reflection.Assembly, System.Globalization.CultureInfo, System.Version)\n at System.Resources.ManifestBasedResourceGroveler.GetSatelliteAssembly(System.Globalization.CultureInfo)\n at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(System.Globalization.CultureInfo, System.Collections.Generic.Dictionary`2\u003cSystem.String,System.Resources.ResourceSet>, Boolean, Boolean)\n at System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo, Boolean, Boolean)\n at System.Resources.ResourceManager.GetString(System.String, System.Globalization.CultureInfo)\n at Microsoft.PowerShell.Commands.CertificateProvider.InitializeDefaultDrives()\n at System.Management.Automation.SessionStateInternal.InitializeProvider(System.Management.Automation.Provider.CmdletProvider, System.Management.Automation.ProviderInfo, System.Management.Automation.CmdletProviderContext)\n at System.Management.Automation.SessionStateInternal.NewProvider(System.Management.Automation.ProviderInfo)\n at System.Management.Automation.SessionStateInternal.AddProvider(System.Type, System.String, System.String, System.Management.Automation.PSSnapInInfo, System.Management.Automation.PSModuleInfo)\n at System.Management.Automation.SessionStateInternal.AddSessionStateEntry(System.Management.Automation.Runspaces.SessionStateProviderEntry)\n at System.Management.Automation.Runspaces.InitialSessionState.Bind_LoadProviders(System.Management.Automation.SessionStateInternal)\n at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)\n at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread)\n at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(System.Threading.Tasks.Task, Boolean)\n at System.Threading.Tasks.TaskScheduler.TryRunInline(System.Threading.Tasks.Task, Boolean)\n at System.Threading.Tasks.Task.WrappedTryRunInline()\n at System.Threading.Tasks.Task.WaitAllCore(System.ReadOnlySpan`1\u003cSystem.Threading.Tasks.Task>, Int32, System.Threading.CancellationToken)\n at System.Threading.Tasks.Task.WaitAll(System.Threading.Tasks.Task[])\n at System.Threading.Tasks.Parallel.Invoke(System.Threading.Tasks.ParallelOptions, System.Action[])\n at System.Management.Automation.Runspaces.InitialSessionState.Bind(System.Management.Automation.ExecutionContext, Boolean, System.Management.Automation.PSModuleInfo, Boolean, Boolean, Boolean)\n at System.Management.Automation.AutomationEngine..ctor(System.Management.Automation.Host.PSHost, System.Management.Automation.Runspaces.InitialSessionState)\n at System.Management.Automation.Runspaces.LocalRunspace.DoOpenHelper()\n at System.Management.Automation.Runspaces.RunspaceBase.CoreOpen(Boolean)\n at System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.CreateRunspace()\n at System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.OpenHelper()\n at System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.CoreOpen(Boolean, System.AsyncCallback, System.Object)\n at System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.Open()\n at Microsoft.Windows.PowerShell.ScriptAnalyzer.CommandInfoCache..ctor()\n at Microsoft.Windows.PowerShell.ScriptAnalyzer.Helper+\u003c>c.\u003c.ctor>b__24_0()\n at System.Lazy`1[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ViaFactory(System.Threading.LazyThreadSafetyMode)\n at System.Lazy`1[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ExecutionAndPublication(System.LazyHelper, Boolean)\n at System.Lazy`1[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].CreateValue()\n at Microsoft.Windows.PowerShell.ScriptAnalyzer.Helper.get_CommandInfoCache()\n at Microsoft.Windows.PowerShell.ScriptAnalyzer.Helper.GetCommandInfo(System.String, System.Nullable`1\u003cSystem.Management.Automation.CommandTypes>, Boolean)\n at Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules.AvoidAlias+\u003cAnalyzeScript>d__9.MoveNext()\n at System.Collections.Generic.List`1[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]..ctor(System.Collections.Generic.IEnumerable`1\u003cSystem.__Canon>)\n at System.Linq.Enumerable.ToList[[System.__Canon, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1\u003cSystem.__Canon>)\n at Microsoft.Windows.PowerShell.ScriptAnalyzer.ScriptAnalyzer+\u003c>c__DisplayClass84_1.\u003cAnalyzeSyntaxTree>b__2()\n at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(System.Threading.Thread, System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)\n at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread)\n at System.Threading.ThreadPoolWorkQueue.Dispatch()\n at System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()\n\n[process exited with code 3221225725 (0xc00000fd)]\n```\n\nEnvironment data\n----------------\n\n```PowerShell\n> $PSVersionTable\n\nName Value\n---- -----\nPSVersion 7.5.0\nPSEdition Core\nGitCommitId 7.5.0\nOS Microsoft Windows 10.0.22631\nPlatform Win32NT\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion 2.3\nSerializationVersion 1.1.0.1\nWSManStackVersion 3.0\n\n> (Get-Module -ListAvailable PSScriptAnalyzer).Version | ForEach-Object { $_.ToString() }\n1.23.0\n```\n","author":{"url":"https://github.com/martincostello","@type":"Person","name":"martincostello"},"datePublished":"2025-02-06T18:44:57Z","url":"https://github.com/PowerShell/PSScriptAnalyzer/issues/2056"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:49dc05c6-a0cf-0e79-7ee4-cf6bba92a4cf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB84:3D0013:135E4DB:1B65960:6AFCE24E |
| html-safe-nonce | e7175694504438885c16916e95729791c592a37330fa7a473ad8c82b2de6a0f5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjg0OjNEMDAxMzoxMzVFNERCOjFCNjU5NjA6NkFGQ0UyNEUiLCJ2aXNpdG9yX2lkIjoiNjI5NTk1NjU2NDg4MDQ1MDEyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ff0ada2044257c17b5593e43765b011e9f65dbc70b0b2afd522a94bc8daebfd9 |
| hovercard-subject-tag | issue:2836317868 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PSScriptAnalyzer/2056/issue_layout |
| twitter:image | https://opengraph.githubassets.com/19dbdf6fe0f1ae00d2acb06bb010200fa3288e8a08b563b71c64474eed099129/PowerShell/PSScriptAnalyzer/issues/2056 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/19dbdf6fe0f1ae00d2acb06bb010200fa3288e8a08b563b71c64474eed099129/PowerShell/PSScriptAnalyzer/issues/2056 |
| og:image:alt | This afternoon I was writing a inline PowerShell script in a GitHub Actions workflow whose intention is to lint the usage of PowerShell in GitHub Actions workflows (♾), and while testing it locally... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | martincostello |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0c05b7eb5b95e29725d01bb1f560a020e3fafd0f033c6b9ed3918fa3161254dd |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PSScriptAnalyzer git https://github.com/PowerShell/PSScriptAnalyzer.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 33149177 |
| octolytics-dimension-repository_nwo | PowerShell/PSScriptAnalyzer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33149177 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PSScriptAnalyzer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 79d9154e55368884c8c93766ba4fee076343d37f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width