[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `scm_c_read ()' and `swap_buffer' trick harmful
From: |
Miroslav Lichvar |
Subject: |
Re: `scm_c_read ()' and `swap_buffer' trick harmful |
Date: |
Sat, 20 Dec 2008 20:11:54 +0100 |
User-agent: |
Mutt/1.5.18 (2008-11-24) |
On Sat, Dec 20, 2008 at 06:10:31PM +0100, Ludovic Courtès wrote:
> > #4 0x0000000000638b66 in internal_ly_parse_scm (ps=0x7fff2b827bc0) at
> > parse-scm.cc:43
>
> This function reads this:
>
> SCM form = scm_read (port);
>
>
> /* Reset read_buf for scm_ftell.
> Shouldn't scm_read () do this for us? */
> scm_fill_input (port);
>
> The answer to the question here is "yes": `scm_fill_input ()' is really
> an internal function (although its name suggests otherwise) and
> shouldn't be called directly. When calling `scm_read ()',
> `scm_fill_input ()' is called behind the scenes when PORT's buffer needs
> to be refilled.
>
> Thus, I would suggest removing the call to `scm_fill_input ()'. Can you
> tell whether it fixes the problem?
Removing the line fixes the crash. Thanks for the help!
--
Miroslav Lichvar