Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent CLI failure: "assertion failed [block != nullptr]: BasicBlock requested for unrecognized address" #17655

Closed
5 tasks done
mklement0 opened this issue Jul 9, 2022 · 3 comments
Labels
WG-DevEx-Portability authoring cross-platform or cross-architecture modules, cmdlets, and scripts

Comments

@mklement0
Copy link
Contributor

mklement0 commented Jul 9, 2022

Prerequisites

Steps to reproduce

Note:

  • This happens as of PowerShell Core 7.3.0-preview.5, but not in 7.2.5
  • It happens on an M1 Mac (ARM CPU) - haven't looked for it on other platforms.
  • It happens intermittently, hence the repetition of the command below.
  • I don't know if PowerShell or perhaps .NET is to blame.
1..1e2 | % { pwsh -nop -c '"hi"' }

Expected behavior

hi 
... # repeated 100 times in total

Actual behavior

hi
...
assertion failed [block != nullptr]: BasicBlock requested for unrecognized address
(BuilderBase.h:550 block_for_offset)
...
hi
...
assertion failed [block != nullptr]: BasicBlock requested for unrecognized address
(BuilderBase.h:550 block_for_offset)
hi
...

Error details

Intermittently, you'll see the following error message - sometimes hi prints, sometimes it doesn't:

assertion failed [block != nullptr]: BasicBlock requested for unrecognized address
(BuilderBase.h:550 block_for_offset)

Environment data

PowerShell Core v7.3.0-preview.5 (.NET 7.0.0-preview.5.22301.12) on macOS 12.4, on an M1 (ARM) MacBook Pro.

Visuals

No response

@mklement0 mklement0 added the Needs-Triage The issue is new and needs to be triaged by a work group. label Jul 9, 2022
@kasini3000
Copy link

hi, I use win10 x86 platform and can't reproduce it.
anybody try it on win,linux vm on mac?

@StevenBucher98
Copy link
Collaborator

If I copy directly the code: 1..1e2 | % { pwsh -nop -c '"hi"' } I get:

hi: The term 'hi' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

but if I rather do something like this 1..1e2 | % { pwsh -nop -c Write-Host "hi" } seems to work fine. I am Windows 11 x64 and 7.3.0-preview5

@StevenBucher98 StevenBucher98 added the WG-DevEx-Portability authoring cross-platform or cross-architecture modules, cmdlets, and scripts label Jul 11, 2022
@mklement0
Copy link
Contributor Author

mklement0 commented Jul 11, 2022

Thanks, @kasini3000 and @StevenBucher98:

I realized that I was inadvertently running the x64 version of PowerShell on my M1 (ARM64) Mac (using the Rosetta 2 emulation environment), and it seems that the problem only occurs there.

Since this is an exotic and ill-advised setup, I presume it isn't worth pursuing, so I'm closing this.


As for 1..1e2 | % { pwsh -nop -c '"hi"' } not working for you, @StevenBucher98:
This implies that you've either turned off the PSNativeCommandArgumentPassing experimental feature or you've set $PSNativeCommandArgumentPassing to Legacy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WG-DevEx-Portability authoring cross-platform or cross-architecture modules, cmdlets, and scripts
Projects
None yet
Development

No branches or pull requests

3 participants