aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-07-29 16:27:46 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-07-29 16:27:46 -0300
commitd66198719d10e393dfba57c1f4aeea307cdb49ea (patch)
treeff20c15738c2b6011b49a73978c34571072d5423
parent91bf77534c1bdd24a2687dd45b84bd7cc6878a45 (diff)
downloadlua-d66198719d10e393dfba57c1f4aeea307cdb49ea.tar.gz
lua-d66198719d10e393dfba57c1f4aeea307cdb49ea.tar.bz2
lua-d66198719d10e393dfba57c1f4aeea307cdb49ea.zip
several bugs for Lua 5.0 + new format for bug entries
-rw-r--r--bugs158
1 files changed, 157 insertions, 1 deletions
diff --git a/bugs b/bugs
index 89ec20db..9e9df19b 100644
--- a/bugs
+++ b/bugs
@@ -1,4 +1,4 @@
1 1--[[
2** lua.stx / llex.c 2** lua.stx / llex.c
3Tue Dec 2 10:45:48 EDT 1997 3Tue Dec 2 10:45:48 EDT 1997
4>> BUG: "lastline" was not reset on function entry, so debug information 4>> BUG: "lastline" was not reset on function entry, so debug information
@@ -334,3 +334,159 @@ Thu Mar 20 11:40:12 EST 2003
334>> zio mixes a 255 as first char in a buffer with EOZ 334>> zio mixes a 255 as first char in a buffer with EOZ
335(by lhf; since 5.0a) 335(by lhf; since 5.0a)
336 336
337
338
339--]]
340-----------------------------------------------------------------
341-- Lua 5.0 (final)
342
343Bug{
344what = [[lua_closethread exists only in the manual]],
345report = [[by Nguyen Binh, 28/04/2003]],
346patch = [[no patch; the manual is wrong]],
347}
348
349
350Bug{
351what = [[attempt to resume a running coroutine crashes Lua]],
352example = [[
353function co_func (current_co)
354 coroutine.resume(co)
355end
356co = coroutine.create(co_func)
357coroutine.resume(co)
358coroutine.resume(co) --> seg. fault
359]],
360report = [[by Alex Bilyk, 09/05/2003]],
361patch = [[???]],
362}
363
364
365Bug{
366what = [[file:close cannot be called without a file. (results in seg fault)]],
367example = [[
368> io.stdin.close() -- correct call shold be io.stdin:close()
369]],
370report = [[by Tuomo Valkonen, 27/05/2003]],
371patch = [[
372* liolib.c:
373161c161
374< if (lua_isnone(L, 1)) {
375---
376> if (lua_isnone(L, 1) && lua_type(L, lua_upvalueindex(1)) == LUA_TTABLE) {
377]], --}}
378}
379
380
381Bug{
382what = [[C functions also may have stacks larger than current top]],
383example = [[
384Must recompile lua with a change in lua.c and with lua_assert defined:
385* lua.c:
386381a382
387> lua_checkstack(l, 1000);
388]],
389report = [[Alex Bilyk, 09/06/2003]],
390patch = [[
391* lgc.c:
392247c247
393< if (!(ci->state & CI_C) && lim < ci->top)
394---
395> if (lim < ci->top)
396]],
397}
398
399Bug{
400what = [[`pc' address is invalidated when a coroutine is suspended]],
401example = [[
402function g(x)
403 coroutine.yield(x)
404end
405
406function f (i)
407 debug.sethook(print, "l")
408 for j=1,1000 do
409 g(i+j)
410 end
411end
412
413co = coroutine.wrap(f)
414co(10)
415pcall(co)
416pcall(co)
417]],
418report = [[Nick Trout, 07/07/2003]],
419patch = [[
420* lvm.c:
421402d401
422< L->ci->u.l.pc = &pc;
423405a405
424> L->ci->u.l.pc = &pc;
425676,678c676
426< lua_assert(ci->u.l.pc == &pc &&
427< ttisfunction(ci->base - 1) &&
428< (ci->state & CI_SAVEDPC));
429---
430> lua_assert(ttisfunction(ci->base - 1) && (ci->state & CI_SAVEDPC));
431]]
432}
433
434
435Bug{
436what = [[userdata to be collected still counts into new GC threshold,
437increasing memory consumption]],
438report = [[Roberto, 25/07/2003]],
439example = [[
440a = newproxy(true)
441getmetatable(a).__gc = function () end
442for i=1,10000000 do
443 newproxy(a)
444 if math.mod(i, 10000) == 0 then print(gcinfo()) end
445end
446]],
447patch = [[
448*lgc.h:
44918c18
450< void luaC_separateudata (lua_State *L);
451---
452> size_t luaC_separateudata (lua_State *L);
453
454*lgc.c:
455113c113,114
456< void luaC_separateudata (lua_State *L) {
457---
458> size_t luaC_separateudata (lua_State *L) {
459> size_t deadmem = 0;
460127a129
461> deadmem += sizeudata(gcotou(curr)->uv.len);
462136a139
463> return deadmem;
464390c393
465< static void checkSizes (lua_State *L) {
466---
467> static void checkSizes (lua_State *L, size_t deadmem) {
468400c403
469< G(L)->GCthreshold = 2*G(L)->nblocks; /* new threshold */
470---
471> G(L)->GCthreshold = 2*G(L)->nblocks - deadmem; /* new threshold */
472454c457,458
473< static void mark (lua_State *L) {
474---
475> static size_t mark (lua_State *L) {
476> size_t deadmem;
477467c471
478< luaC_separateudata(L); /* separate userdata to be preserved */
479---
480> deadmem = luaC_separateudata(L); /* separate userdata to be preserved */
481475a480
482> return deadmem;
483480c485
484< mark(L);
485---
486> size_t deadmem = mark(L);
487482c487
488< checkSizes(L);
489---
490> checkSizes(L, deadmem);
491]]
492