Skip to content

x/tools/go/analysis: framepointer doesn't report BP clobbering on Windows #47027

Open
@egonelbre

Description

@egonelbre

https://go-review.googlesource.com/c/tools/+/248686 introduced frame pointer check for clobbering BP register, however the check is only enabled for linux and darwin.

// func mixBlocksSSE2(out, a, b, c *block)
TEXT ·mixBlocksSSE2(SB), 4, $0-32
	MOVQ out+0(FP), DX
	MOVQ a+8(FP), AX
	MOVQ b+16(FP), BX
	MOVQ c+24(FP), CX
	MOVQ $128, BP
	RET

As an example doesn't report the clobbering on windows. https://github.com/golang/crypto/blob/5ff15b29337e062d850872081bcd9f4d784f4c25/argon2/blamka_amd64.s#L204

It's not clear why other OS-s were excluded from this analysis.

I would expect the clobbering to be reported on files that are compiled for linux/darwin on windows as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AnalysisIssues related to static analysis (vet, x/tools/go/analysis)NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-WindowsToolsThis label describes issues relating to any tools in the x/tools repository.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions