From: Sam S. <sd...@gn...> - 2004-05-03 19:31:58
|
> * Bruno Haible <oe...@py...t> [2004-05-03 21:08:06 +0200]: > > The crash is here. nicknames_ = 0x67fc3250, an invalid pointer. > > var gcv_object_t *nicknames_ = &STACK_2; > pushSTACK(STACK_2); > while (mconsp(STACK_0)) { > var object nickname = correct_packname(Car(STACK_0),true); > if (nullp(nickname)) { /* CONTINUE: discard nickname */ > *nicknames_ = Cdr(*nicknames_); > } else { /* corrected: replace */ > Car(*nicknames_) = nickname; <============= HERE > nicknames_ = &Cdr(*nicknames_); > } > STACK_0 = Cdr(STACK_0); > } > > correct_packname() can trigger GC. Apparently it did, and nicknames_ > was pointing to the Cdr of a cons that was moved, into a memory page that > was freed. what you are saying is that nicknames_ = &Cdr(*nicknames_); is illegal (just like creating an object of type gcv_object_t), right? -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.honestreporting.com> If you want it done right, you have to do it yourself |