Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/release-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,38 @@ jobs:
$env:PATH = "$prefix\bin;$env:PATH"
ctest --test-dir $build -C $env:BUILD_TYPE --output-on-failure

# Windows on ARM64 with the runner's newest Visual Studio. It catches ARM64
# build failures and miscompilation by newer MSVC releases than CI uses.
build-windows-arm64:
runs-on: windows-11-arm

steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0

- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39
with:
enable-cache: false

- name: Configure CMake
shell: pwsh
run: >
cmake -S "${{ github.workspace }}" -B "${{ github.workspace }}\\build"
-A ARM64
-DGECODE_ENABLE_QT=OFF
-DGECODE_ENABLE_GIST=OFF
-DGECODE_ENABLE_MPFR=OFF
-DGECODE_BUILD_SHARED=OFF
-DGECODE_BUILD_STATIC=ON

- name: Build
shell: pwsh
run: cmake --build "${{ github.workspace }}\\build" --config ${{ env.BUILD_TYPE }}

- name: Check
shell: pwsh
run: cmake --build "${{ github.workspace }}\\build" --config ${{ env.BUILD_TYPE }} --target check

build-windows-vcpkg:
runs-on: windows-2022

Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ if(GECODE_SANITIZER_NORMALIZED)
endif()
endif()

# Some sources exceed MSVC's default object-file section limit when targeting
# ARM64 (C1128).
if(MSVC)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/bigobj>)
endif()

# Enable the dependencies required by higher-level modules.
if(GECODE_ENABLE_SET_VARS)
gecode_force_option_on(GECODE_ENABLE_INT_VARS "Set variables require int variables")
Expand Down
20 changes: 20 additions & 0 deletions changelog.in
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,26 @@ Rank: minor
The -replay test option now takes the complete random state printed for a
failed iteration.

[ENTRY]
Module: support
What: bug
Rank: major
Thanks: Kevin Leo
[DESCRIPTION]
Fix wrong answers in Release builds made with Visual Studio 2026 (MSVC
19.52) on x64 and ARM64. Search lost solutions on basic integer constraints
such as x < y, x == y, and lexicographic order, and could report
satisfiable models as unsatisfiable. GECODE_ASSUME now expands to assert
instead of MSVC's __assume, which triggered the miscompilation.

[ENTRY]
Module: other
What: bug
Rank: minor
[DESCRIPTION]
Fix Windows ARM64 builds under MSVC failing with C1128 (too many sections)
in gecode/int/extensional-tuple-set.cpp by passing /bigobj to C++ compiles.

[RELEASE]
Version: 6.6.1
Date: 2026-11-29
Expand Down
16 changes: 4 additions & 12 deletions gecode/support/macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,12 @@
* \def GECODE_ASSUME
* \brief Assert certain property
*
* This might be used for optimization as well (for example,
* Microsoft Visual C++), otherwise it behaves like any
* assert.
* Expands to \c assert on all compilers and is not given to the
* optimizer as an assumption. Under Visual Studio 2026 (MSVC 19.52) on
* x64 and ARM64, \c __assume causes Release builds to lose solutions on
* integer constraints.
*
*/

#if defined(_MSC_VER) && defined(NDEBUG)

#define GECODE_ASSUME(p) __assume((p))

#else

#define GECODE_ASSUME(p) assert((p))

#endif

// STATISTICS: support-any
Loading