[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] bounds checking with tcc
From: |
Herman ten Brugge |
Subject: |
[Tinycc-devel] bounds checking with tcc |
Date: |
Tue, 29 Oct 2019 07:55:43 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
I tried bound checking with tcc and found some problems. (See attached
patch).
First the bounds checking code is included in shared objects and in the
application.
This means that for example malloc and friends are redirected twice.
I fixed this in tccelf.c
Second problem is that only arrays are checked.
But there are a lot of other objects like structs with arrays or
variables with address taken that should also work.
Fixed this in tccgen.c
The last one is some problems with code generation on x86_64.
The difficult one was the VT_LLOCAL code.
Fixed in x86_64-gen.c
I will stop now because bounds checking looks not to work for complex
applications.
Perhaps we could add the above code to git? The first and last one are
fixing problems.
For the last problem I have a testcase that reproduces the VT_LLOCAL
problem.
Regards,
Herman
bounds
Description: Text document
- [Tinycc-devel] bounds checking with tcc,
Herman ten Brugge <=