unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* An Error in Early Boot
@ 2010-10-14 21:06 Noah Lavine
  2010-10-14 23:36 ` Mike Gran
  0 siblings, 1 reply; 3+ messages in thread
From: Noah Lavine @ 2010-10-14 21:06 UTC (permalink / raw)
  To: guile-devel

Hello,

I got into a situation just now when Guile was generating an error
very early in the boot process (it was loading some objcode from
scm_init_eval_in_scheme(), I think, although I haven't looked enough
to be sure). The fun part is, instead of printing an error message, it
got into an infinite recursion that eventually ended in a memory
fault.

The reason is that scm_error_scm in error.c calls scm_ithrow (error.c:315),
which finds its way through scm_throw and some VM calls to
pre_init_throw (throw.c:495)
which in turn gets it to scm_at_abort, which goes to scm_c_abort,
which finally calls scm_misc_error (control.c:210) because it can't
find a prompt on the dynamic stack because the error is too early,
which leads back to scm_error_scm again.

However, I'm not quite sure how to fix this.

Noah



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: An Error in Early Boot
  2010-10-14 21:06 An Error in Early Boot Noah Lavine
@ 2010-10-14 23:36 ` Mike Gran
  2010-10-15  2:31   ` Noah Lavine
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Gran @ 2010-10-14 23:36 UTC (permalink / raw)
  To: Noah Lavine, guile-devel

> From: Noah Lavine <noah.b.lavine@gmail.com>
> 
> Hello,
> 
> I got into a situation just now when Guile was generating an error
> very early in the boot process (it was loading some objcode from
> scm_init_eval_in_scheme(), I think, although I haven't looked enough
> to be sure). The fun part is, instead of printing an error message, it
> got into an infinite recursion that eventually ended in a memory
> fault.
> 
> The reason is that scm_error_scm in error.c calls scm_ithrow (error.c:315),
> which finds its way through scm_throw and some VM calls to
> pre_init_throw (throw.c:495)
> which in turn gets it to scm_at_abort, which goes to scm_c_abort,
> which finally calls scm_misc_error (control.c:210) because it can't
> find a prompt on the dynamic stack because the error is too early,
> which leads back to scm_error_scm again.

Hi Noah,

FWIW, I also noticed the infinite recusion problem in bug #30162.

http://savannah.gnu.org/bugs/?30162

At the time, I thought that the following revision might be the one
that caused the problem.

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=c6a32a2cd59190dcf17c7fb3022588f56079a03e


-Mike



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: An Error in Early Boot
  2010-10-14 23:36 ` Mike Gran
@ 2010-10-15  2:31   ` Noah Lavine
  0 siblings, 0 replies; 3+ messages in thread
From: Noah Lavine @ 2010-10-15  2:31 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-devel

Yeah, it looks to me like that code would resolve this issue.

What I don't understand, however, is why the pre-init-catch-tag, which
that patch added, didn't resolve the issue. Is this a difference
between catch tags and prompts?

Noah

On Thu, Oct 14, 2010 at 7:36 PM, Mike Gran <spk121@yahoo.com> wrote:
>> From: Noah Lavine <noah.b.lavine@gmail.com>
>>
>> Hello,
>>
>> I got into a situation just now when Guile was generating an error
>> very early in the boot process (it was loading some objcode from
>> scm_init_eval_in_scheme(), I think, although I haven't looked enough
>> to be sure). The fun part is, instead of printing an error message, it
>> got into an infinite recursion that eventually ended in a memory
>> fault.
>>
>> The reason is that scm_error_scm in error.c calls scm_ithrow (error.c:315),
>> which finds its way through scm_throw and some VM calls to
>> pre_init_throw (throw.c:495)
>> which in turn gets it to scm_at_abort, which goes to scm_c_abort,
>> which finally calls scm_misc_error (control.c:210) because it can't
>> find a prompt on the dynamic stack because the error is too early,
>> which leads back to scm_error_scm again.
>
> Hi Noah,
>
> FWIW, I also noticed the infinite recusion problem in bug #30162.
>
> http://savannah.gnu.org/bugs/?30162
>
> At the time, I thought that the following revision might be the one
> that caused the problem.
>
> http://git.savannah.gnu.org/cgit/guile.git/commit/?id=c6a32a2cd59190dcf17c7fb3022588f56079a03e
>
>
> -Mike
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-15  2:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14 21:06 An Error in Early Boot Noah Lavine
2010-10-14 23:36 ` Mike Gran
2010-10-15  2:31   ` Noah Lavine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).