Amalgamation compiles with warnings at -O0 (-Wreturn-type) and -O1 (-Wmaybe-uninitialized)
Maintainer thường phản hồi trong vòng 1 ngà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
- 72/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
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu với bản build amalgamation: chạy make amalgamation, sau đó biên dịch build/eigenscript_all.c bằng gcc -Wall -Wextra -O0 -c và -O1 để tái hiện các cảnh báo. Cảnh báo -Wreturn-type trỏ tới builtin_tensor_gather, hàm này kết thúc bằng ARG_GUARD(1, ...); hãy thêm một return tường minh sau raise. Các cảnh báo -Wmaybe-uninitialized liên quan đến _ad/_bd trong vm_run_ex và chỉ số i trong vm_index_resolve; hãy khởi tạo chúng ngay tại nơi khai báo. Hoàn thành khi cả hai bản build đều không in dòng warning: nào và make embed-smoke bảo vệ điều này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Finding
The release build (make, -O2) is warning-free, but the shipped single-file amalgamation (make amalgamation, build/eigenscript_all.c, the "copy two files" embed path, #397) is not at the other usual optimisation levels. Measured on main 0740af03 with gcc -Wall -Wextra $(cat tools/werror_flags.txt) -c build/eigenscript_all.c:
-O0(the usual embedder debug build): 1 warning,builtin_tensor_gather:control reaches end of non-void function [-Wreturn-type]. The function ends inARG_GUARD(1, ...), whose constant condition-O0does not fold.-O1: 7 warnings, all-Wmaybe-uninitialized:- 5 x
_ad, reached throughnum_to_i64_exact, inlined intovm_run_ex. The bitwise arms read_adafterslot_as_double(_as, &_ad) & slot_as_double(_bs, &_bd), which sets it only on success. - 2 x
i, reached throughvm_index_resolve, inlined intojit_helper_index_set.
- 5 x
All are false positives by inspection, but an embedder compiling eigenscript_all.c with -Wall at -O0 or -O1 gets them. Found while building #1758's C slot test against the amalgamation, which now compiles with the release flags to avoid them.
Done when
- After
make amalgamation,gcc -Wall -Wextra $(cat tools/werror_flags.txt) -O0 -c build/eigenscript_all.cand the same with-O1print nowarning:line (paste both counts in the PR). -
builtin_tensor_gatherends in a statement the compiler can see returns at every level, for example the raise followed by an explicitreturn._ad/_bdand the indexiare initialised where they are declared. - A check keeps it that way. For example,
make embed-smokealso compiles the amalgamation at-O0 -Wall -Wextraand greps the output forwarning:. Planted fault: removing thereturnagain turns it red.
- Ngôn ngữ chính
- C
- Star
- 3
- Fork
- 7
- Merge trung bình
- 8 giờ 41 phút
- Pull request đã merge (30 ngày)
- 254
Chuẩn bị môi trường
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.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của InauguralSystems/EigenScript
-
eigenscript.h declares 8 observer functions that no longer existCó thể đã có người làm @facelessdevhack đã nhận 1 ngày trước. Đang mởarea:observer enhancement found-by:cold-read good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
InauguralSystems/EigenScript#1781 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
UB: (int) cast of a user double outside int range in dispatch / vm_index_is_int / flat_index_atĐang mởarea:runtime-vm
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
InauguralSystems/EigenScript#1748 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
scan_int_tokens line/col fields are untestedCó thể đã có người làm @facelessdevhack đã nhận 1 ngày trước. Đang mởarea:stdlib found-by:critic kind:gate-defect
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
InauguralSystems/EigenScript#1693 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:gfx bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
InauguralSystems/EigenScript#1684 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:stdlib bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
InauguralSystems/EigenScript#1679 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của InauguralSystems/EigenScript
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
FujiNetWIFI/fujinet-lib#186 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
VIEW_TYPE set for computer playersCó thể đã có người làm @Loobinex đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 78/100
brunodev85/winlator-app#90 ·