diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-11-24 11:59:15 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-11-24 11:59:15 -0200 |
| commit | 7e63d3da0240325db4011f5d2f2e8abfb5d60288 (patch) | |
| tree | f6f486aaa9c1279ccdc26a1cc8bc814e005a277b /ltests.c | |
| parent | 84e32ad2ebd6bd160c1320456743a5b1d8f233e9 (diff) | |
| download | lua-7e63d3da0240325db4011f5d2f2e8abfb5d60288.tar.gz lua-7e63d3da0240325db4011f5d2f2e8abfb5d60288.tar.bz2 lua-7e63d3da0240325db4011f5d2f2e8abfb5d60288.zip | |
Some bugs with stack reallocation by 'luaF_close'
(Long time without testing with '-DHARDSTACKTESTS'...)
With the introduction of to-be-closed variables, calls to 'luaF_close'
can move the stack, but some call sites where keeping pointers to the
stack without correcting them.
Diffstat (limited to 'ltests.c')
| -rw-r--r-- | ltests.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -142,7 +142,7 @@ void *debug_realloc (void *ud, void *b, size_t oldsize, size_t size) { | |||
| 142 | freeblock(mc, block); | 142 | freeblock(mc, block); |
| 143 | return NULL; | 143 | return NULL; |
| 144 | } | 144 | } |
| 145 | if (mc->countlimit != ~0UL && size > 0) { /* count limit in use? */ | 145 | if (mc->countlimit != ~0UL && size != oldsize) { /* count limit in use? */ |
| 146 | if (mc->countlimit == 0) | 146 | if (mc->countlimit == 0) |
| 147 | return NULL; /* fake a memory allocation error */ | 147 | return NULL; /* fake a memory allocation error */ |
| 148 | mc->countlimit--; | 148 | mc->countlimit--; |
