Skip to content

fix: fix Sparce attention and Qwen loader on windows - #110

Merged
davide221 merged 2 commits into
Luce-Org:mainfrom
aminya:ref
May 6, 2026
Merged

davide221 merged 2 commits into
Luce-Org:mainfrom
aminya:ref

Conversation

@aminya

@aminya aminya commented May 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="dflash/src/qwen3_0p6b_loader.cpp">

<violation number="1" location="dflash/src/qwen3_0p6b_loader.cpp:162">
P2: Windows error paths return after allocating `out.buf`/`out.ctx` without freeing them, leaking loader resources on failure.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@@ -28,9 +28,19 @@
#include <cstdio>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Windows error paths return after allocating out.buf/out.ctx without freeing them, leaking loader resources on failure.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At dflash/src/qwen3_0p6b_loader.cpp, line 162:

<comment>Windows error paths return after allocating `out.buf`/`out.ctx` without freeing them, leaking loader resources on failure.</comment>

<file context>
@@ -142,6 +152,39 @@ bool load_qwen3_0p6b_drafter(const std::string & path,
+        if (wlen <= 0) {
+            set_last_error("MultiByteToWideChar failed for " + path);
+            gguf_free(gctx);
+            return false;
+        }
+        wpath.resize(wlen - 1);
</file context>

@davide221

Copy link
Copy Markdown
Contributor

@aminya thanks for the contribution, lgtm

@davide221
davide221 merged commit 628dd18 into Luce-Org:main May 6, 2026
1 check passed
oliveagle pushed a commit to oliveagle/lucebox-hub that referenced this pull request May 22, 2026
fix: fix Sparce attention and Qwen loader on windows
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