Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

gcc 14 warns -Wreturn-local-addr in builtin_set_at when compiling the amalgamation (main and phase2-numbers)

Open Beginner friendly
#1,859 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
c, github-actions

Research direction

Start in src/builtins.c at builtin_set_at and trace the buffer path through BUILTIN_LIST_VIEW and slot_view. Run make embed-smoke with gcc 14 to reproduce the warning in build/eigenscript_all.c; the issue identifies list_get_ref(arg, 0) as one possible route. Done means the amalgamation builds without -Wreturn-local-addr and the CI extensions / server log has no warning from that file.

Written by the indexing model from the issue text.

Description

area:ci area:runtime-vm bug

Found by the #1758 R1.3 CI-fix builder, 2026-10-19, while reading CI logs. The same warning is present on main.

In CI's extensions / server job (gcc 14.2 in the dev image), make embed-smoke compiles the amalgamation with a warning:

build/eigenscript_all.c: In function 'builtin_set_at':
build/eigenscript_all.c:16782:1: warning: function may return address of local variable [-Wreturn-local-addr]
...
        slot_view(list_slot((list), (i)), &(EigsView){{0}})
...
note: in expansion of macro 'BUILTIN_LIST_VIEW'
        Value *buf = BUILTIN_LIST_VIEW(arg, 0);

It appears on main (run 39269449864 at 965dfbd0, job extensions / server, at 14:31:11Z and 14:32:26Z) and on phase2-numbers (run 39263025702). Local gcc 13.3 does not warn.

By reading the code it is a false positive. builtin_set_at (src/builtins.c, the #1093 buffer path) returns buf only after buf->type == VAL_BUFFER. A buffer is a heap reference, so slot_view returns the reference and not the compound-literal facade. gcc 14 cannot prove that. Still, a warning in a CI lane hides the next real one, and the repository's builds aim at zero warnings.

Done when

  • gcc 14 compiles make embed-smoke (the amalgamation) with no -Wreturn-local-addr warning. For example, the buffer path takes list_get_ref(arg, 0), a real reference, instead of a facade view, or the facade lives in a named local scoped to the function.
  • CI's extensions / server log for the PR shows no warning: line from build/eigenscript_all.c.
Dominant language
C
Stars
3
Forks
7
Avg merge
11h 16m
Merged PRs (30d)
267

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from InauguralSystems/EigenScript

All issues in InauguralSystems/EigenScript

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.