Skip to content

Commit 0c8eb3a

Browse files
committed
Remove the type allignment check
Change-Id: I8876fdce37c322ea0e6d2b8b56bac89520585cec Signed-off-by: Cosmin Cojocar <[email protected]>
1 parent f537eab commit 0c8eb3a

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

analyzer.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -511,14 +511,6 @@ func (gosec *Analyzer) buildSSA(pkg *packages.Package) (*buildssa.SSA, error) {
511511
if pkg.TypesInfo == nil {
512512
return nil, fmt.Errorf("package %s has no type information", pkg.Name)
513513
}
514-
// The SSA and CtrlFlow builders require architecture sizing (WordSize/MaxAlign).
515-
// If go/packages didn't provide it, we MUST provide a default to prevent panics.
516-
typesSizes := pkg.TypesSizes
517-
if typesSizes == nil {
518-
// Fallback to standard 64-bit sizes (WordSize: 8, MaxAlign: 8)
519-
// This is safe for most analysis contexts.
520-
typesSizes = &types.StdSizes{WordSize: 8, MaxAlign: 8}
521-
}
522514
pass := &analysis.Pass{
523515
Fset: pkg.Fset,
524516
Files: pkg.Syntax,

0 commit comments

Comments
 (0)