Skip to content

QP ASM: zero-sized Cholesky storage causes NaNs and a false Unbounded status #3453

Closed

Description

@VON0000

Please provide the following information where possible/relevant and check out CONTRIBUTING.md.

What version of HiGHS and what language are you using?
Version: v1.15.1
Language: C++. The issue was originally observed through Python and independently reproduced with a standalone C++ replay.

Which solver are you using (e.g. LP, MIP, QP)

QP active-set solver (QP ASM).

What operating system (Linux, Windows, ...) and version?

Windows x64, MSVC 19.41.34123.0.

What did you do?
Steps to reproduce the behaviour:

  1. Build unmodified HiGHS at latest commit in master brance in Release mode.
  2. Build the supplied highs_qp_replay.cpp against HiGHS, with highs_case_data.h in the same directory.
  3. Run qp_replay.exe 0.

What did you expect to see

An Optimal status with a finite solution.

What did you see instead?

HiGHS returned Unbounded after 76 QP iterations. The returned primal solution contained NaNs at zero-based variable indices 11 and 17.

Make sure you include information that can help us debug (full error message, model if possible).

Anything else we should know about your project / environment

The problem appears to originate in highs/qpsolver/factor.hpp:

  • recompute() resizes the Cholesky storage to zero when the null-space dimension is zero.
  • Subsequent expand() doubles that storage dimension, which remains zero.
  • The code then accesses an empty vector with a zero matrix stride, corrupting the factor and eventually producing Inf/NaN.

Locally, keeping the storage dimension at least one in resize() resolves this failure without changing the actual null-space dimension:
new_k_max = max(HighsInt(1), new_k_max);

With this change, the same QP returns Optimal with finite values and a maximum constraint violation of approximately 3.55e-14.

A two-variable regression fails without the fix and passes with it. All 21 QP tests pass in Release and Debug, and the full Release CTest suite passes 165/165 tests.

Image|

highs-zero-cholesky-repro.zip

Activity

  1. self-assigned this
    on Oct 22, 2026
  2. jajhall commented on Oct 22, 2026

    @jajhall
    SponsorMember

    Closed by #3458

  3. jajhall commented on Oct 22, 2026

    @jajhall
    SponsorMember

    Thanks @VON0000. I couldn't reproduce the situation where new_k_max is zero, but I see what would happen if it ever was. What you suggest makes sense and can do no harm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions