diff options
| -rw-r--r-- | bugs | 30 |
1 files changed, 29 insertions, 1 deletions
| @@ -925,7 +925,7 @@ patch = [[ | |||
| 925 | } | 925 | } |
| 926 | 926 | ||
| 927 | 927 | ||
| 928 | @Bug{ | 928 | Bug{ |
| 929 | what = [[lua_dostring/lua_dofile should return any values returned | 929 | what = [[lua_dostring/lua_dofile should return any values returned |
| 930 | by the chunk]], | 930 | by the chunk]], |
| 931 | 931 | ||
| @@ -946,3 +946,31 @@ patch = [[ | |||
| 946 | ]], | 946 | ]], |
| 947 | 947 | ||
| 948 | } | 948 | } |
| 949 | |||
| 950 | |||
| 951 | Bug{ | ||
| 952 | |||
| 953 | what = [[garbage collector does not compensate enough for finalizers]], | ||
| 954 | |||
| 955 | patch = [[ | ||
| 956 | lgc.c: | ||
| 957 | @@ -322,4 +322,6 @@ | ||
| 958 | |||
| 959 | -static void propagateall (global_State *g) { | ||
| 960 | - while (g->gray) propagatemark(g); | ||
| 961 | +static size_t propagateall (global_State *g) { | ||
| 962 | + size_t m = 0; | ||
| 963 | + while (g->gray) m += propagatemark(g); | ||
| 964 | + return m; | ||
| 965 | } | ||
| 966 | @@ -542,3 +544,3 @@ | ||
| 967 | marktmu(g); /* mark `preserved' userdata */ | ||
| 968 | - propagateall(g); /* remark, to propagate `preserveness' */ | ||
| 969 | + udsize += propagateall(g); /* remark, to propagate `preserveness' */ | ||
| 970 | cleartable(g->weak); /* remove collected objects from weak tables */ | ||
| 971 | @@ -592,2 +594,4 @@ | ||
| 972 | GCTM(L); | ||
| 973 | + if (g->estimate > GCFINALIZECOST) | ||
| 974 | + g->estimate -= GCFINALIZECOST; | ||
| 975 | ]] | ||
| 976 | } | ||
