Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#1,859 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c, github-actions
Lĩnh vực
build-system, ci-cd

Hướng nghiên cứu

Bắt đầu tại src/builtins.c, ở builtin_set_at, rồi lần theo đường đi của buffer qua BUILTIN_LIST_VIEW và slot_view. Chạy make embed-smoke với gcc 14 để tái hiện cảnh báo trong build/eigenscript_all.c; issue xác định list_get_ref(arg, 0) là một hướng có thể dẫn đến cảnh báo. Công việc hoàn tất khi amalgamation được build mà không có -Wreturn-local-addr và CI extensions / server log không có cảnh báo nào từ tệp đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
C
Star
3
Fork
7
Merge trung bình
11 giờ 16 phút
Pull request đã merge (30 ngày)
267

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của InauguralSystems/EigenScript

Tất cả issue của InauguralSystems/EigenScript

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.