Skip to content

cl: fix wrong global variable type patching - #1002

Merged
xushiwei merged 1 commit into
xgo-dev:mainfrom
cpunion:fix-global-var-type
Feb 16, 2025
Merged

cl: fix wrong global variable type patching#1002
xushiwei merged 1 commit into
xgo-dev:mainfrom
cpunion:fix-global-var-type

Conversation

@cpunion

@cpunion cpunion commented Feb 16, 2025

Copy link
Copy Markdown
Collaborator

Fix wrong sync.Mutex size that cause crashes on linux.

Fix #1001

Before:

; linux
%sync.Mutex = type { i32, i32 }
@testing.matchMutex = global %sync.Mutex zeroinitializer, align 4

; macos
%sync.Mutex = type { i64, [56 x i8] }
@testing.matchMutex = global %sync.Mutex zeroinitializer, align 8

After:

; linux
@testing.matchMutex = global [48 x i8]

; macos (no changes)
%sync.Mutex = type { i64, [56 x i8] }
@testing.matchMutex = global %sync.Mutex zeroinitializer, align 8

@codecov

codecov Bot commented Feb 16, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.33%. Comparing base (51755b8) to head (d8e782f).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1002      +/-   ##
==========================================
+ Coverage   89.27%   89.33%   +0.06%     
==========================================
  Files          46       46              
  Lines        8702     8696       -6     
==========================================
  Hits         7769     7769              
+ Misses        761      756       -5     
+ Partials      172      171       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xushiwei
xushiwei merged commit 69deeca into xgo-dev:main Feb 16, 2025
@cpunion
cpunion deleted the fix-global-var-type branch February 16, 2025 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong sync.Mutex type generation on linux

2 participants