diff options
| author | keren <keren@bluebird.(none)> | 2014-01-10 10:23:11 -0800 |
|---|---|---|
| committer | keren <keren@bluebird.(none)> | 2014-01-10 10:23:11 -0800 |
| commit | 80b36ab628ecb04d94e2593a61adf321e1325cd4 (patch) | |
| tree | cccb1557ac26aa5c97f0996f7e18807b97e0361d /tccrun.c | |
| parent | fdf9fba5785f5c0d285c8cbf2fa51df32ddd878d (diff) | |
| download | tinycc-80b36ab628ecb04d94e2593a61adf321e1325cd4.tar.gz tinycc-80b36ab628ecb04d94e2593a61adf321e1325cd4.tar.bz2 | |
Fix missing mem_size assignment when using mmap()
Diffstat (limited to 'tccrun.c')
| -rw-r--r-- | tccrun.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -60,6 +60,8 @@ LIBTCCAPI int tcc_relocate(TCCState *s1, void *ptr) #ifdef HAVE_SELINUX { /* Use mmap instead of malloc for Selinux. */ + s1->mem_size = ret; + s1->write_mem = mmap (NULL, ret, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); if (s1->write_mem == MAP_FAILED) |
