Re: [hatari-devel] Big bug in the SDL UI

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On sunnuntai 28 kesäkuu 2015, Nicolas Pomarède wrote:
> Le 24/06/2015 20:28, Nicolas Pomarède a écrit :
> PS : I wanted to try "mudflap" with this to see if it detects the leak,
> but unfortunatelly mudflap was discontinued with latest gcc 4.9. It's
> replaced by "-fsanitize=address"
> (https://code.google.com/p/address-sanitizer/) , but after some quick
> tests it didn't seem to detect this case :(

These kind of tools cannot find logic errors in the code i.e.
wrong values for direct types.  They find invalid accesses done
for different kind of memory areas (pointer handling):
    Use after free (dangling pointer dereference)
    Heap buffer overflow
    Stack buffer overflow
    Global buffer overflow
    Use after return *
    Initialization order bugs 

https://code.google.com/p/address-sanitizer/wiki/AddressSanitizer

* This refers to using stack content after function returns.

Invalid accesses don't happen because SDLGui_DoDialog() return value
is used in calling code as comparison value (mainly as switch() value),
not as-is for indexing an array.


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/