[Bug libelf/32311] elf_compress_gnu.c: gcc warns null-dereference with lto

2024-11-04 Thread the.ra2.ifv at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32311 --- Comment #2 from User441669 --- So the compiler is not very smart... Thanks for your review -- You are receiving this mail because: You are on the CC list for the bug.

[Bug libelf/32311] New: elf_compress_gnu.c: gcc warns null-dereference with lto

2024-10-27 Thread the.ra2.ifv at gmail dot com
Priority: P2 Component: libelf Assignee: unassigned at sourceware dot org Reporter: the.ra2.ifv at gmail dot com CC: elfutils-devel at sourceware dot org Target Milestone: --- Created attachment 15764 --> https://sourceware.org/bugzi

[Bug libelf/32311] elf_compress_gnu.c: gcc warns null-dereference with lto

2024-11-06 Thread the.ra2.ifv at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32311 --- Comment #4 from User441669 --- Just one more step! Error log: ```text aarch64-openwrt-linux-musl-gcc-ranlib libelf_pic.a ccache aarch64-openwrt-linux-musl-gcc -std=gnu99 -Wall -Wshadow -Wformat=2 -Wold-style-definition -Wstrict-prototype

[Bug libelf/32311] elf_compress_gnu.c: gcc warns null-dereference with lto

2024-11-06 Thread the.ra2.ifv at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32311 --- Comment #8 from User441669 --- Created attachment 15783 --> https://sourceware.org/bugzilla/attachment.cgi?id=15783&action=edit elfutils-success.log The full log after a successful compilation. -- You are receiving this mail because:

[Bug libelf/32311] elf_compress_gnu.c: gcc warns null-dereference with lto

2024-11-06 Thread the.ra2.ifv at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32311 --- Comment #9 from User441669 --- Compilation successfully! I plan to close this issue as fixed, and send this patch to the OpenWrt project (named `007-fix-null-dereference-with-lto.patch` in the attachments) linker prints some warnings, loo

[Bug libelf/32311] elf_compress_gnu.c: gcc warns null-dereference with lto

2024-11-06 Thread the.ra2.ifv at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32311 --- Comment #5 from User441669 --- (In reply to Mark Wielaard from comment #3) > Unfortunately I cannot replicate the warning/error even with -flto. I have no ideas about this. It might be related to the compiler version or musl libc -- You

[Bug libelf/32311] elf_compress_gnu.c: gcc warns null-dereference with lto

2024-11-06 Thread the.ra2.ifv at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32311 --- Comment #7 from User441669 --- Created attachment 15782 --> https://sourceware.org/bugzilla/attachment.cgi?id=15782&action=edit 007-fix-null-dereference-with-lto.patch The patch that fixes everything -- You are receiving this mail bec

[Bug libelf/32311] elf_compress_gnu.c: gcc warns null-dereference with lto

2024-11-07 Thread the.ra2.ifv at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32311 --- Comment #12 from User441669 --- > Thanks for the testing. > I see you have some other openwrt specific patches. > Do you think any of them are useful upstream or for other distros? Uh, no, I'm not sure about this because I'm just a simple