ProAlgos-Cpp icon indicating copy to clipboard operation
ProAlgos-Cpp copied to clipboard

two algorthims fail -fsanitize = address

Open pm100 opened this issue 2 years ago • 3 comments

I turned on a bunch of gcc sanitizers

set(CMAKE_CXX_FLAGS "-g -O0 -Wall -Wextra -pedantic-errors -fsanitize=leak -fsanitize=address -fsanitize=undefined ")

This picked up the three leaking programs I reported before. Plus it detected

knuth_morris_pratt:
=================================================================
==26751==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020000000d4 at pc 0x55f2698bd590 bp 0x7ffc0d266560 sp 0x7ffc0d266550

and

binary_search:
=================================================================
==26722==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6020000000d4 at pc 0x55972fefc2b9 bp 0x7ffe4cb4de70 sp 0x7ffe4cb4de60

pm100 avatar Apr 05 '23 21:04 pm100

This issue has been automatically marked as inactive because it has not had recent activity. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 10 '23 00:06 stale[bot]

Thanks for reporting this! These sanitizers seem very helpful, I'll add them to the build process.

faheel avatar Jun 13 '23 01:06 faheel

i have pending fixes for these as well. Have been out of country for a while, hence the silence

pm100 avatar Jun 18 '23 01:06 pm100