Re: [Gc] Program broken

Ivan Maidanski ivmai at mail.ru
Wed Sep 23 04:43:56 PDT 2009


Hi!

Hugh <up2dream at gmail.com> wrote:
> Hi,
>
> My program often broke on line marked with "*". The error is First-chance
> exception at 0x00000000 in HostApp.exe: 0xC0000005: access violation read
> 0x00000000 .
>
> Any help will be appreciated.
>
> inline gc_cleanup::gc_cleanup() {
>     GC_finalization_proc oldProc;
>     void* oldData;
>     void* base = GC_base( (void *) this );
>     if (0 != base)  {
>       // Don't call the debug version, since this is a real base address.
> ********      GC_register_finalizer_ignore_self( *****
>         base, (GC_finalization_proc)cleanup, (void*) ((char*) this - (char*)
> base),
>         &oldProc, &oldData );

There is no pointer dereference in this line, so it shouldn't produce SEGV.
I guess you mean the SEGV is somewhere in GC_register_finalizer_ignore_self(), right? If yes, could you point to that place?

>       if (0 != oldProc) {
>         GC_register_finalizer_ignore_self( base, oldProc, oldData, 0, 0 );}}}

Bye.


More information about the Gc mailing list