Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

heap-use-after-free crash in test application #8

Open
MatthiasMann opened this issue Nov 3, 2020 · 4 comments
Open

heap-use-after-free crash in test application #8

MatthiasMann opened this issue Nov 3, 2020 · 4 comments

Comments

@MatthiasMann
Copy link

I have compiled 1e2be4d for ARM 32 user space on an AARCH 64 kernel (Linux C300 5.8.0-20200922-1 #1 SMP PREEMPT 2020-09-01T00:00:00+00:00 aarch64 GNU/Linux) using axboe/liburing@bd62cfb with OSELAS.Toolchain-2020.08.0/arm-v7a-linux-gnueabihf/gcc-10.2.1-clang-10.0.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/bin/arm-v7a-linux-gnueabihf-g++ in -std=c++20 mode.

And I get the following crash report from asan: https://gist.github.com/MatthiasMann/419fa12bbff6f21f94cc4367e82ddc9b

@CarterLi
Copy link
Owner

CarterLi commented Nov 3, 2020

Strange, but I have no arm devices ( expect an android phone running Linux 4.19 ) to test.
Did you try any other examples?

@MatthiasMann
Copy link
Author

Yes, in the file_server I also get crashes which I can 'solve' by removing when_all. But then I get other crashes :(
I also get the following warning on compile:

$ make
/opt/OSELAS.Toolchain-2020.08.0/arm-v7a-linux-gnueabihf/gcc-10.2.1-clang-10.0.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/bin/arm-v7a-linux-gnueabihf-g++ ./file_server.cpp ./mime_dicts.cpp -o file_server -O0 -rdynamic -D_LIBCPP_DEBUG_LEVEL=1 -fno-omit-frame-pointer -fsanitize=address -fcoroutines -g -Wall -std=c++20 -I../liburing/src/include -I.. -L/home/matthias/Documents/HDIOBox/OSELAS.BSP-NXP/platform-at1130/sysroot-target/usr/lib -I/home/matthias/Documents/HDIOBox/OSELAS.BSP-NXP/platform-at1130/sysroot-target/usr/include  -L../liburing/src -lfmt -luring -pthread
./file_server.cpp: In function 'task<> http_send_file(io_service&, std::string, int, int)':
./file_server.cpp:76:1: warning: statement has no effect [�]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-value-Wunused-value�]8;;]
   76 | }
      | ^
./file_server.cpp:76:1: warning: statement has no effect [�]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-value-Wunused-value�]8;;]

these compiler warning go away when I remove the usages of when_all.

@CarterLi
Copy link
Owner

CarterLi commented Nov 3, 2020

Yes, in the file_server I also get crashes which I can 'solve' by removing when_all. But then I get other crashes :(
I also get the following warning on compile:

$ make
/opt/OSELAS.Toolchain-2020.08.0/arm-v7a-linux-gnueabihf/gcc-10.2.1-clang-10.0.1-glibc-2.32-binutils-2.35-kernel-5.8-sanitized/bin/arm-v7a-linux-gnueabihf-g++ ./file_server.cpp ./mime_dicts.cpp -o file_server -O0 -rdynamic -D_LIBCPP_DEBUG_LEVEL=1 -fno-omit-frame-pointer -fsanitize=address -fcoroutines -g -Wall -std=c++20 -I../liburing/src/include -I.. -L/home/matthias/Documents/HDIOBox/OSELAS.BSP-NXP/platform-at1130/sysroot-target/usr/lib -I/home/matthias/Documents/HDIOBox/OSELAS.BSP-NXP/platform-at1130/sysroot-target/usr/include  -L../liburing/src -lfmt -luring -pthread
./file_server.cpp: In function 'task<> http_send_file(io_service&, std::string, int, int)':
./file_server.cpp:76:1: warning: statement has no effect [�]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-value-Wunused-value�]8;;]
   76 | }
      | ^
./file_server.cpp:76:1: warning: statement has no effect [�]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-value-Wunused-value�]8;;]

these compiler warning go away when I remove the usages of when_all.

when_{all,any} definitely need more work. I'll remove them for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants