AFLplusplus / AFLplusplus/LibAFL
qemu_libafl_bridge/subprojects/dtc/libfdt compilation broken for fuzzers/full_system/qemu_baremetal
- Lenguaje dominante
- Rust
- Estrellas
- 2.6k
- Forks
- 481
- Merge medio
- 2 d 30 min
- PR fusionados (30 d)
- 16
Descripción
**IMPORTANT**
1. You have verified that the issue to be present in the current `main` branch
Thank you for making LibAFL better!
**Describe the bug**
A clear and concise description of what the bug is.
If you want to present the backtrace, don't forget to run with `errors_backtrace` feature and log from `RUST_LOG`
In addition, please tell us what is your fuzzer's Cargo.toml
Compilation of qemu_libafl_bridge has the below error, in the middle of successful compilation:
```
FAILED: [code=1] subprojects/dtc/libfdt/libfdt.a.p/fdt_overlay.c.o
/home/rohanseth/GitHub/school/LibAFL/fuzzers/full_system/qemu_baremetal/target/debug/qemu-libafl-bridge/linker_interceptor.py -m64 -Isubprojects/dtc/libfdt/li
bfdt.a.p -Isubprojects/dtc/libfdt -I../subprojects/dtc/libfdt -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -Wpointer-arith -Wcast-qual
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow -DFDT_ASSUME_MASK=0 -DNO_YAML -mcx16 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_B
ITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -ftrivial-auto-var-init=zero -fzero-call-used-regs=used-gpr -fPIC -DAS_LIB=1 -fPIC -MD -MQ s
ubprojects/dtc/libfdt/libfdt.a.p/fdt_overlay.c.o -MF subprojects/dtc/libfdt/libfdt.a.p/fdt_overlay.c.o.d -o subprojects/dtc/libfdt/libfdt.a.p/fdt_overlay.c.o -c
../subprojects/dtc/libfdt/fdt_overlay.c
../subprojects/dtc/libfdt/fdt_overlay.c: In function ‘overlay_fixup_phandle’:
../subprojects/dtc/libfdt/fdt_overlay.c:461:21: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
461 | sep = memchr(fixup_str, ':', fixup_len);
| ^
../subprojects/dtc/libfdt/fdt_overlay.c:471:21: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
471 | sep = memchr(name, ':', fixup_len);
| ^
cc1: all warnings being treated as errors
```
I know this error was occurring before with a slightly older version of qemu because of some changes to gcc 15, but I believe that was resolved last week. I guess this example has some feature flag where the code was unchanged?
**To Reproduce**
Steps to reproduce the behavior:
1. compile the fuzzers/full_system/qemu_baremetal example with `cargo build --release`
**Expected behavior**
A clear and concise description of what you expected to happen.
The subproject should compile correctly.
**Screen output/Screenshots**
If applicable, add copy-paste of the screen output or screenshot that shows the issue. Please ensure the output is in **English** and not in Chinese, Russian, German, etc.
stderr for specific affected version:
```
ninja: build stopped: subcommand failed.
--- stderr
From https://github.com/AFLplusplus/qemu-libafl-bridge
* branch c9c6db9127509e1eeaf10daad8fa6bc12cc54f56 -> FETCH_HEAD
Note: switching to 'FETCH_HEAD'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at c9c6db9 Merge pull request #123 from rmalmain/qemu_update_v10_2_0
DEBUG:mkvenv:/home/rohanseth/GitHub/school/LibAFL/fuzzers/full_system/qemu_baremetal/target/debug/qemu-libafl-bridge/python/scripts/mkvenv.py: make_venv(env_d
ir=pyvenv, system_site_packages=True, clear=True, symlinks=None, with_pip=True)
DEBUG:mkvenv:QemuEnvBuilder.__init__(...)
mkvenv: Creating non-isolated virtual environment at 'pyvenv'
DEBUG:mkvenv:Invoking builder.create()
DEBUG:mkvenv:create(env_dir=pyvenv)
DEBUG:mkvenv:ensure_directories(env_dir=/home/rohanseth/GitHub/school/LibAFL/fuzzers/full_system/qemu_baremetal/target/debug/qemu-libafl-bridge/build/pyvenv)
DEBUG:mkvenv:post_venv_setup()
DEBUG:mkvenv:generate_console_scripts(packages=['pip'], python_path=/home/rohanseth/GitHub/school/LibAFL/fuzzers/full_system/qemu_baremetal/target/debug/qemu-
libafl-bridge/build/pyvenv/bin/python3, bin_path=/home/rohanseth/GitHub/school/LibAFL/fuzzers/full_system/qemu_baremetal/target/debug/qemu-libafl-bridge/build/p
yvenv/bin)
INFO:pip._vendor.distlib.util:changing mode of /home/rohanseth/GitHub/school/LibAFL/fuzzers/full_system/qemu_baremetal/target/debug/qemu-libafl-bridge/build/p
yvenv/bin/pip to 755
DEBUG:mkvenv:wrote console_script '/home/rohanseth/GitHub/school/LibAFL/fuzzers/full_system/qemu_baremetal/target/debug/qemu-libafl-bridge/build/pyvenv/bin/pi
p'
INFO:pip._vendor.distlib.util:changing mode of /home/rohanseth/GitHub/school/LibAFL/fuzzers/full_system/qemu_baremetal/target/debug/qemu-libafl-bridge/build/p
yvenv/bin/pip3 to 755
DEBUG:mkvenv:wrote console_script '/home/rohanseth/GitHub/school/LibAFL/fuzzers/full_system/qemu_baremetal/target/debug/qemu-libafl-bridge/build/pyvenv/bin/pi
p3'
INFO:pip._vendor.distlib.util:changing mode of /home/rohanseth/GitHub/school/LibAFL/fuzzers/full_system/qemu_baremetal/target/debug/qemu-libafl-bridge/build/p
yvenv/bin/pip3.10 to 755
DEBUG:mkvenv:wrote console_script '/home/rohanseth/GitHub/school/LibAFL/fuzzers/full_system/qemu_baremetal/target/debug/qemu-libafl-bridge/build/pyvenv/bin/pi
p3.10'
DEBUG:mkvenv:mkvenv.py post_init: exiting
DEBUG:mkvenv:builder.create() finished
DEBUG:mkvenv:mkvenv.py create: exiting
mkvenv: checking for meson>=1.5.0
mkvenv: checking for pycotap>=1.1.0
mkvenv: installing meson==1.9.0, pycotap==1.3.1
DEBUG:mkvenv:mkvenv.py ensuregroup: exiting
From https://gitlab.com/qemu-project/dtc
* branch b6910bec11614980a21e46fbccc35934b671bd81 -> FETCH_HEAD
HEAD is now at b6910be Bump version to v1.6.1
From https://gitlab.com/qemu-project/keycodemapdb
* branch f5772a62ec52591ff6870b7e8ef32482371f22c6 -> FETCH_HEAD
HEAD is now at f5772a6 Add Qemu qcode support for F13 to F24
make: *** [Makefile:170: run-ninja] Error 1
thread 'main' (3196891) panicked at /home/rohanseth/GitHub/school/LibAFL/crates/libafl_qemu/libafl_qemu_build/src/build.rs:462:9:
Make didn't finish successfully
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
**Additional context**
Add any other context about the problem here.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.