This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: unwind question
Dietmar Maurer <dietmar@ximian.com> writes:
> On Wed, 2002-11-20 at 23:40, Martin v. Loewis wrote:
> > Dietmar Maurer <dietmar@ximian.com> writes:
> >
> > > So it really true that all libc functions either have unwind info, or
> > > they cant raise synchronous exceptions?
> >
> > That is the plan, yes, since it that requirement holds for C++, and
> > nobody has complained, yet.
>
> But wait, who generates the exception tables for those functions?
>
> 1) the libc team compile them manually with -fexcetions
> 2) gcc generate those tables automatically if I compile a program which
> calls such a function
>
> 1) would be quite useless for me (because I need a solution working with
> any library), so I guess gcc provides that functionality?
>
> For example imagine a Library LIBA, which is compiled with -fexcetions,
> which calls a function bad_func() in LIBB, which has no exception
> tables. Is it then possible to unwind bad_func()?
Note that unwinding, say, GTK+, (to pick a random library that is
used from mono) would require a _lot_ more work than adding
-fexceptions. Unless memory leaks and random crashes are what
you are shooting for.
Basically, any time native code calls back into Mono, you need
to add a blanket exception trap.
Regards,
Owen