Skip to content

two algorthims fail -fsanitize = address #449

Description

@pm100

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions