Heap protection check bad address

Joel Sherrill joel at rtems.org
Mon May 13 23:41:38 UTC 2019


On Mon, May 13, 2019, 6:04 PM Chris Johns <chrisj at rtems.org> wrote:

> Hi,
>
> I chased down a buffer overwrite bug in libdl (#3746). On the powerpc and
> sparc
> the test dl05.exe crashed and on xilinx_zynq_a9_qemu I got a heap
> protection
> error on free. This was really nice however it is a mission to take that
> error
> message and figure out the block address that is the cause. A had to add a
> couple of additional prints to get the block address and with that I could
> set a
> watch point that triggered on the invalid write. The patch to fix the bug
> was
> the easy part.
>
> Would a bad block variable set by the error handler that can be inspected
> by a
> debugger or exit handler be useful?
>

I would like to see the ability to register a handler for various heap
issues. And then pass all the info you have to it.

--joel

>
> Chris
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190513/85eb097f/attachment-0002.html>


More information about the devel mailing list