Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix ICE with Windows ARM64 (1.3)#17846

Merged
Mytherin merged 1 commit intoduckdb:v1.3-ossivalisfrom
staticlibs:win_arm64_ice_fix_13
Jun 8, 2025
Merged

Fix ICE with Windows ARM64 (1.3)#17846
Mytherin merged 1 commit intoduckdb:v1.3-ossivalisfrom
staticlibs:win_arm64_ice_fix_13

Conversation

@staticlibs
Copy link
Contributor

This is a 1.3 backport of PR #17844.

This change attempts to fix the ICE that happens on Windows with MSVC ARM64 toolchains - with both cross-compiling and native ones.

Abbreviated example (stacktrace can differ):

 CL.exe /c /IC:[...] /nologo /W1 /WX- /diagnostics:column
   /O2 /Ob2 /Oy- /D[...] /EHsc /MD /GS /fp:precise /Zc:[...] /Fo"[...]"
   /Fd"[...]" /external:W1 /Gd /TP /wd[...] /analyze- /errorReport:queue
   /utf-8 /bigobj
   C:\a\duckdb\duckdb\extension\core_functions\scalar\date\ub_duckdb_core_functions_date.cpp
   base type 1 bad size 16
   base type 1 bad size 16
   base type 1 bad size 16
   base type 1 bad size 16
     CL!RaiseException()+0x60
     CL!RaiseException()+0x60
     CL!InvokeCompilerPass()+0x7f7f
     CL!InvokeCompilerPass()+0x171
[...]Microsoft.CppCommon.targets(781,5):
    error MSB6006: "CL.exe" exited with code -529706956. [[...].vcxproj]

It lowers inlining requirements for ub_duckdb_core_functions_date.cpp on MSVC ARM64 Release and RelWithDebInfo builds from /Ob2:

The default value under /O1 and /O2. Allows the compiler to expand
any function not explicitly marked for no inlining.

to /Ob1:

Allows expansion only of functions marked inline, __inline, or
__forceinline, or in a C++ member function defined in a class
declaration.

Testing: cannot reproduce this locally with cross-compiling, only tested with partial build on GH actions (native and cross).

Fixes: duckdblabs/duckdb-internal#5079

This is a 1.3 backport of PR duckdb#17844.

This change attempts to fix the ICE that happens on Windows with MSVC
ARM64 toolchains - with both cross-compiling and native ones.

Abbreviated example (stacktrace can differ):

```
 CL.exe /c /IC:[...] /nologo /W1 /WX- /diagnostics:column
   /O2 /Ob2 /Oy- /D[...] /EHsc /MD /GS /fp:precise /Zc:[...] /Fo"[...]"
   /Fd"[...]" /external:W1 /Gd /TP /wd[...] /analyze- /errorReport:queue
   /utf-8 /bigobj
   C:\a\duckdb\duckdb\extension\core_functions\scalar\date\ub_duckdb_core_functions_date.cpp
   base type 1 bad size 16
   base type 1 bad size 16
   base type 1 bad size 16
   base type 1 bad size 16
     CL!RaiseException()+0x60
     CL!RaiseException()+0x60
     CL!InvokeCompilerPass()+0x7f7f
     CL!InvokeCompilerPass()+0x171
[...]Microsoft.CppCommon.targets(781,5):
    error MSB6006: "CL.exe" exited with code -529706956. [[...].vcxproj]
```

It lowers inlining requirements for `ub_duckdb_core_functions_date.cpp`
on MSVC ARM64 `Release` and `RelWithDebInfo` builds from `/Ob2`:

> The default value under /O1 and /O2. Allows the compiler to expand
> any function not explicitly marked for no inlining.

to `/Ob1`:

> Allows expansion only of functions marked inline, __inline, or
> __forceinline, or in a C++ member function defined in a class
> declaration.

Testing: cannot reproduce this locally with cross-compiling, only
tested with partial build on GH actions (native and cross).

Fixes: duckdblabs/duckdb-internal#5079
@Mytherin Mytherin merged commit bbeac37 into duckdb:v1.3-ossivalis Jun 8, 2025
48 checks passed
@Mytherin
Copy link
Collaborator

Mytherin commented Jun 8, 2025

Thanks!

@staticlibs staticlibs deleted the win_arm64_ice_fix_13 branch June 8, 2025 22:36
github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Jun 8, 2025
[Fix] WAL replay catalog error in AddForeignKeyConstraint (duckdb/duckdb#17830)
Fix ICE with Windows ARM64 (1.3) (duckdb/duckdb#17846)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Jun 8, 2025
[Fix] WAL replay catalog error in AddForeignKeyConstraint (duckdb/duckdb#17830)
Fix ICE with Windows ARM64 (1.3) (duckdb/duckdb#17846)

Co-authored-by: krlmlr <[email protected]>
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.

2 participants