[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 3.2 Bug
- From: Supratik Champati <champati@...>
- Date: Wed, 01 Sep 1999 14:53:33 -0400
oops! I wanted to say it isn't rather obvious.
The problem is ls->fs->f->consts is initially NULL.
the call to checkname(ls) allocates the array.
On HPUX it is trying to access the index of a NULL array
and hence dumping core.
Michael T. Richter wrote:
>
> At 01:53 PM 9/1/99 , you wrote:
> >static TaggedString *str_checkname (LexState *ls) {
> > return tsvalue(&ls->fs->f->consts[checkname(ls)]);
> >}
>
> >static TaggedString *str_checkname (LexState *ls) {
> > int sc = checkname(ls);
> > return tsvalue(&ls->fs->f->consts[sc]);
> >}
>
> >This is causing a core dump on HPUX machines. The reason
> >is rather obvious.
>
> It isn't obvious at all to me. What's the problem? Does HPUX's version of
> C not allow return values of functions in array accessors?
>
> --
> Michael T. Richter <mtr@ottawa.com> http://www.igs.net/~mtr/
> PGP Key: http://www.igs.net/~mtr/pgp-key.html
> PGP Fingerprint: 40D1 33E0 F70B 6BB5 8353 4669 B4CC DD09 04ED 4FE8
--
Supratik