[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bus error on MacOS
- From: Dong Feng <middle.fengdong@...>
- Date: Sat, 4 May 2013 21:53:37 +0800
GCC on Mac is of low priority on Apple's radar. Maybe time to change
the default compiler in make to clang for Mac OS X.
2013/5/4 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
> This also works but I still don't know why it should be necessary:
>
> static int aux_close (lua_State *L) {
> LStream *p = tolstream(L);
> lua_CFunction cf = p->closef;
> int rc = (cf)(L); /* close it */
> p->closef = NULL; /* mark stream as closed */
> return rc;
> }
>
> It seems to be an optimization problem because the original code below
> works fine with -O0.
>
> static int aux_close (lua_State *L) {
> LStream *p = tolstream(L);
> lua_CFunction cf = p->closef;
> p->closef = NULL; /* mark stream as closed */
> return (*cf)(L); /* close it */
> }
>