aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-09-25 11:52:10 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-09-25 11:52:10 -0300
commitc9c6f9747c0bfc77a72214e4e95e26a95ab66bbd (patch)
treed952d5f71b42a05860331da80129f5c23da07fe1
parentc2aa7bd72d620731b5a54b532523dbd9f8e1bfc3 (diff)
downloadlua-c9c6f9747c0bfc77a72214e4e95e26a95ab66bbd.tar.gz
lua-c9c6f9747c0bfc77a72214e4e95e26a95ab66bbd.tar.bz2
lua-c9c6f9747c0bfc77a72214e4e95e26a95ab66bbd.zip
GC may crash when checking C closures
-rw-r--r--bugs4
-rw-r--r--lgc.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/bugs b/bugs
index b668cc00..c82a31d5 100644
--- a/bugs
+++ b/bugs
@@ -213,3 +213,7 @@ Mon Sep 25 11:47:48 EST 2000
213>> lua_gettable does not get key from stack top 213>> lua_gettable does not get key from stack top
214(by Philip Yi; since 4.0b) 214(by Philip Yi; since 4.0b)
215 215
216** lgc.c
217Mon Sep 25 11:50:48 EST 2000
218>> GC may crash when checking C closures
219(by Philip Yi; since 4.0b)
diff --git a/lgc.c b/lgc.c
index 02dfaebc..9e84919f 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lgc.c,v 1.65 2000/09/11 17:38:42 roberto Exp roberto $ 2** $Id: lgc.c,v 1.66 2000/09/19 08:42:35 roberto Exp roberto $
3** Garbage Collector 3** Garbage Collector
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -152,7 +152,7 @@ static int hasmark (const TObject *o) {
152 case TAG_TABLE: 152 case TAG_TABLE:
153 return ismarked(hvalue(o)); 153 return ismarked(hvalue(o));
154 case TAG_LCLOSURE: case TAG_CCLOSURE: 154 case TAG_LCLOSURE: case TAG_CCLOSURE:
155 return ismarked(clvalue(o)->mark); 155 return ismarked(clvalue(o));
156 default: /* number */ 156 default: /* number */
157 return 1; 157 return 1;
158 } 158 }