Skip to content

UNINIT_READ_SANITY requires ALLOC_SANITY #10

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
theimpostor opened this issue Apr 8, 2021 · 1 comment
Closed

UNINIT_READ_SANITY requires ALLOC_SANITY #10

theimpostor opened this issue Apr 8, 2021 · 1 comment
Assignees

Comments

@theimpostor
Copy link

Uncommenting UNINIT_READ_SANITY in the Makefile without uncommenting ALLOC_SANITY as well results in a compilation error:

rm -rf build/* tests_perf_analysis.txt big_tests_perf_analysis.txt gmon.out test_output.txt *.dSYM core* profiler.data
mkdir -p build/
make library
clang -Wall -Iinclude/ -DTHREAD_SUPPORT=1 -pthread -DTHREAD_ZONE_CACHE=1 -DPRE_POPULATE_PAGES=0 -DSMALL_MEM_STARTUP=0 -DSANITIZE_CHUNKS=0 -DFUZZ_MODE=0 -DPERM_FREE_REALLOC=0 -DDISABLE_CANARY=0 -Werror -pedantic -Wno-pointer-arith -Wno-gnu-zero-variadic-macro-arguments -Wno-format-pedantic -DMALLOC_HOOK=1  -fvisibility=hidden -std=c11      -DUNINIT_READ_SANITY=1 -DCPU_PIN=0 -DEXPERIMENTAL=0 -fPIC -shared -O2 -fstrict-aliasing -Wstrict-aliasing  src/*.c -o build/libisoalloc.so
src/iso_alloc.c:368:5: error: use of undeclared identifier '_uf_fd'
    _uf_fd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK);
    ^
src/iso_alloc.c:370:8: error: use of undeclared identifier '_uf_fd'
    if(_uf_fd == ERR) {
       ^
src/iso_alloc.c:374:5: error: use of undeclared identifier '_uffd_api'
    _uffd_api.api = UFFD_API;
    ^
src/iso_alloc.c:375:5: error: use of undeclared identifier '_uffd_api'
    _uffd_api.features = 0;
    ^
src/iso_alloc.c:377:14: error: use of undeclared identifier '_uf_fd'
    if(ioctl(_uf_fd, UFFDIO_API, &_uffd_api) == ERR) {
             ^
src/iso_alloc.c:377:35: error: use of undeclared identifier '_uffd_api'
    if(ioctl(_uf_fd, UFFDIO_API, &_uffd_api) == ERR) {
                                  ^
6 errors generated.
make: *** [Makefile:137: library] Error 1

A note in the Readme and Makefile that uncommenting ALLOC_SANITY is required to enable UNINIT_READ_SANITY would be helpful.

@struct struct self-assigned this Apr 9, 2021
@struct
Copy link
Owner

struct commented Apr 11, 2021

Thanks @theimpostor. I will clarify this in the README

@struct struct closed this as completed Apr 11, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants