Skip to content

jinja : fix dangling reference warning in for_statement - #29279

Merged
ngxson merged 1 commit into
masterfrom
gg/jinja-fix-dangling-reference
Sep 22, 2026
Merged

ngxson merged 1 commit into
masterfrom
gg/jinja-fix-dangling-reference

Conversation

@ggerganov

@ggerganov ggerganov commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

fix #29271 (comment)

Fix -Werror=dangling-reference CI failure by replacing the IIFE lambdas in for_statement::execute_impl() with direct conditional references using select_expr.

Run: https://github.com/ggml-org/llama.cpp/actions/runs/35762853174

  • I have read and agree with the contributing guidelines.
  • AI usage disclosure: YES. pi:llama.cpp/DeepSeek-V4-Flash-Vision-Exp

Avoid returning references through lambdas that hold a local cast pointer, which triggers -Werror=dangling-reference in some CI compilers. Reuse the precomputed select_expr pointer directly.

Assisted-by: pi:llama.cpp/DeepSeek-V4-Flash-Vision-Exp
@github-actions github-actions Bot added the jinja parser Issues related to the jinja parser label Sep 22, 2026
@ggerganov
ggerganov marked this pull request as ready for review September 22, 2026 17:48
@ggerganov
ggerganov requested a review from CISC as a code owner September 22, 2026 17:48
@ggerganov
ggerganov requested a review from ngxson September 22, 2026 17:57
@ngxson
ngxson merged commit 709fe75 into master Sep 22, 2026
14 checks passed
LadislavSopko pushed a commit to 0ics-srls/llama.cpp that referenced this pull request Oct 5, 2026
Avoid returning references through lambdas that hold a local cast pointer, which triggers -Werror=dangling-reference in some CI compilers. Reuse the precomputed select_expr pointer directly.

Assisted-by: pi:llama.cpp/DeepSeek-V4-Flash-Vision-Exp
frostyautumnleaf pushed a commit to frostyautumnleaf/llama.cpp that referenced this pull request Oct 5, 2026
Avoid returning references through lambdas that hold a local cast pointer, which triggers -Werror=dangling-reference in some CI compilers. Reuse the precomputed select_expr pointer directly.

Assisted-by: pi:llama.cpp/DeepSeek-V4-Flash-Vision-Exp
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 7, 2026
Avoid returning references through lambdas that hold a local cast pointer, which triggers -Werror=dangling-reference in some CI compilers. Reuse the precomputed select_expr pointer directly.

Assisted-by: pi:llama.cpp/DeepSeek-V4-Flash-Vision-Exp
(cherry picked from commit 709fe75)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jinja parser Issues related to the jinja parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants