Closed AregevDev closed 1 month ago
Confirmed that the issue has been reproduced locally.
You can solve your problem by adding the following two sentences in cmakelists.txt. You also need to install asan and ubsan on your Linux.
target_compile_options(raylib_text PRIVATE -fsanitize=address -fsanitize=undefined)
target_link_options(raylib_text PRIVATE -fsanitize=address -fsanitize=undefined)
You can solve your problem by adding the following two sentences in cmakelists.txt. You also need to install asan and ubsan on your Linux.
target_compile_options(raylib_text PRIVATE -fsanitize=address -fsanitize=undefined) target_link_options(raylib_text PRIVATE -fsanitize=address -fsanitize=undefined)
This DOES NOT solve the problem.
ports/raylib/fix-linkGlfw.patch
, but the error message points at a vendored copy:
/home/oak/Documents/vcpkg/buildtrees/raylib/src/5.0-9a639cbe9d.clean/src/external/glfw/src/init.c:97:(.text+0xfb): undefined reference to `__ubsan_handle_pointer_overflow'`
Oh, so the problem in the raylib port, interesting. I'll try using GLFW alone to confirm it. Maybe I'll submit a PR to disable asan in the vcpkg port...
Maybe add the option to use the GLFW port instead of the vendored GLFW as well.
I tried to come up with a PR. It seems like enabling sanitizers is done in the toolchain settings, not in port features. There is zero documentation about it. I am not even sure where the ENABLE_ASAN
and ENABLE_UBSAN
flags come from.
Please change the issue title: The offending port is raylib, not glfw.
Describe the bug Hello, I am trying to install and use raylib port, which depends on glfw. I have a simple CMake project. It seems like the GLFW port requires the adress sanitizer runtime. When adding
asan
andubsan
to mytarget_link_library
, my program compiles and runs but reports false (?) memory leaks from glfw3. My intention is to completely disable the address sanitizer runtime.I tried manually building glfw3 from source and it doesn't happen.
Environment
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Failure logs cmake_error.txt
Additional context Sample.zip