Gestalt now crashes when compiled with gec only

45 Messages Forum Options Options
Permalink
1 2 3
Colin Paul Adams
Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
As of today (I don't know when I last compiled it sucessfully),
gestalt (but not gexslt) seg-faults at start up, when compiled with
gec + boehm gc 7.0, but not without gec, nor when compiled with ISE
6.1.

This seems very strange. It requires both eposix and boehm gc to
produce the error (gexslt compiled with boehm gc does not produce the
error), but does not depend upon any eposix facilities being used
(just typing the command name - expecting the usage message, is
sufficent to seg-fault).

So I suspected a library change. doing an ldd on the executbles gives:

[colin@susannah gestalt]$ ldd ./gestalt
        linux-vdso.so.1 =>  (0x00007fff8bbfe000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000)
        librt.so.1 => /lib64/librt.so.1 (0x0000003eb7200000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000)
[colin@susannah gestalt]$ ldd ~/gobo/bin/gexslt
        linux-vdso.so.1 =>  (0x00007fff075fe000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003ebec00000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000)

so the difference is that gestalt has librt whereas gexslt has
libgcc_s.

Librt has not been updated for a long time, and in any case, it is
linked in even without the boehm gc.

So I can't think of what might be the problem. Anyone have any ideas?
--
Colin Adams
Preston Lancashire

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Eric Bezault
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
Colin Paul Adams wrote:

> As of today (I don't know when I last compiled it sucessfully),
> gestalt (but not gexslt) seg-faults at start up, when compiled with
> gec + boehm gc 7.0, but not without gec, nor when compiled with ISE
> 6.1.
>
> This seems very strange. It requires both eposix and boehm gc to
> produce the error (gexslt compiled with boehm gc does not produce the
> error), but does not depend upon any eposix facilities being used
> (just typing the command name - expecting the usage message, is
> sufficent to seg-fault).
>
> So I suspected a library change. doing an ldd on the executbles gives:
>
> [colin@susannah gestalt]$ ldd ./gestalt
>         linux-vdso.so.1 =>  (0x00007fff8bbfe000)
>         libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000)
>         librt.so.1 => /lib64/librt.so.1 (0x0000003eb7200000)
>         libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000)
>         /lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000)
> [colin@susannah gestalt]$ ldd ~/gobo/bin/gexslt
>         linux-vdso.so.1 =>  (0x00007fff075fe000)
>         libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000)
>         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003ebec00000)
>         libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000)
>         /lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000)
>
> so the difference is that gestalt has librt whereas gexslt has
> libgcc_s.
>
> Librt has not been updated for a long time, and in any case, it is
> linked in even without the boehm gc.
>
> So I can't think of what might be the problem. Anyone have any ideas?

Can you also run ldd on the executable of gestalt compiled with
ISE 6.1?

--
Eric Bezault
mailto:ericb@...
http://www.gobosoft.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Colin Paul Adams
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
>>>>> "Eric" == Eric Bezault <ericb@...> writes:
> [colin@susannah gestalt]$ ldd ./gestalt
>         linux-vdso.so.1 =>  (0x00007fff8bbfe000)
>         libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000)
>         librt.so.1 => /lib64/librt.so.1 (0x0000003eb7200000)
>         libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000)
>         /lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000)
> [colin@susannah gestalt]$ ldd ~/gobo/bin/gexslt
>         linux-vdso.so.1 =>  (0x00007fff075fe000)
>         libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000)
>         libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000)
>         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003ebec00000)
>         libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000)
>         /lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000)
>
    Eric> Can you also run ldd on the executable of gestalt compiled
    Eric> with ISE 6.1?

[colin@susannah gestalt]$ ldd gestalt
        linux-vdso.so.1 =>  (0x00007fff3fdfe000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003eb5200000)
        librt.so.1 => /lib64/librt.so.1 (0x0000003eb7200000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003eb4a00000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003eb4600000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003eb3400000)

So its the same as when compiled with gec.
--
Colin Adams
Preston Lancashire

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Eric Bezault
Re: [eposix] Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
In reply to this post by Colin Paul Adams
Colin Paul Adams wrote:

>>>>>> "Berend" == Berend de Boer <berend@...> writes:
>
>>>>>> "Colin" == Colin Paul Adams <colin@...> writes:
>     Colin> As of today (I don't know when I last compiled it Librt has
>     Colin> not been updated for a long time, and in any case, it is
>     Colin> linked in even without the boehm gc.
>
>     Berend> You could try linking without.
>
> That works, but is not a solution.
>
>     Colin> So I can't think of what might be the problem. Anyone have
>     Colin> any ideas?
>
>     Berend> What I can think of is that eposix isn't 64 bit aware. I
>     Berend> have never tested it on a 64 bit platform, not having
>     Berend> access to one. Hopefully in a couple of months.
>
> Well it has been working satisfactorily for over a month.

You can try to check-out the code from a couple of weeks
ago (both Gobo and gestalt), bootstrap Gobo and see if
it works. If it works, then we have to see if the problem
comes from the code evolution, or from gec's evolution.

--
Eric Bezault
mailto:ericb@...
http://www.gobosoft.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Eric Bezault
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
In reply to this post by Colin Paul Adams
Colin Paul Adams wrote:

> As of today (I don't know when I last compiled it sucessfully),
> gestalt (but not gexslt) seg-faults at start up, when compiled with
> gec + boehm gc 7.0, but not without gec, nor when compiled with ISE
> 6.1.
>
> This seems very strange. It requires both eposix and boehm gc to
> produce the error (gexslt compiled with boehm gc does not produce the
> error), but does not depend upon any eposix facilities being used
> (just typing the command name - expecting the usage message, is
> sufficent to seg-fault).

> So I can't think of what might be the problem. Anyone have any ideas?

If the problem comes from gec, it might be a consequence of that:

  * When gec compiles an application with the Boehm GC, it now generates
    code that will let the GC trigger the feature `dispose' when objects
    are reclaimed.

You can try to edit the file $GOBO/tool/gec/runtime/c/ge_gc.h and
replace line 68:

#define GE_register_dispose(obj, disp)
GC_REGISTER_FINALIZER((void*)(obj), (void (*) (void*, void*))
&GE_boehm_dispose, (void*)(disp), NULL, NULL)

by:

#define GE_register_dispose(obj, disp) /* do nothing */

and then recompile gestalt.

--
Eric Bezault
mailto:ericb@...
http://www.gobosoft.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Colin Paul Adams
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
>>>>> "Eric" == Eric Bezault <ericb@...> writes:

    Eric> If the problem comes from gec, it might be a consequence of
    Eric> that:

    Eric>   * When gec compiles an application with the Boehm GC, it
    Eric> now generates code that will let the GC trigger the feature
    Eric> `dispose' when objects are reclaimed.

    Eric> You can try to edit the file
    Eric> $GOBO/tool/gec/runtime/c/ge_gc.h and replace line 68:

    Eric> #define GE_register_dispose(obj, disp)
    Eric> GC_REGISTER_FINALIZER((void*)(obj), (void (*) (void*,
    Eric> void*)) &GE_boehm_dispose, (void*)(disp), NULL, NULL)

    Eric> by:

    Eric> #define GE_register_dispose(obj, disp) /* do nothing */

    Eric> and then recompile gestalt.

This works.

But note that I do not have the problem on my 32-bit system (I
tried both before and after an svn update), so it might be a problem
with Boehm gc 7.0 on 64-bit systems. I will try a newer version.
--
Colin Adams
Preston Lancashire

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Eric Bezault
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
Colin Paul Adams wrote:

>>>>>> "Eric" == Eric Bezault <ericb@...> writes:
>
>     Eric> If the problem comes from gec, it might be a consequence of
>     Eric> that:
>
>     Eric>   * When gec compiles an application with the Boehm GC, it
>     Eric> now generates code that will let the GC trigger the feature
>     Eric> `dispose' when objects are reclaimed.
>
>     Eric> You can try to edit the file
>     Eric> $GOBO/tool/gec/runtime/c/ge_gc.h and replace line 68:
>
>     Eric> #define GE_register_dispose(obj, disp)
>     Eric> GC_REGISTER_FINALIZER((void*)(obj), (void (*) (void*,
>     Eric> void*)) &GE_boehm_dispose, (void*)(disp), NULL, NULL)
>
>     Eric> by:
>
>     Eric> #define GE_register_dispose(obj, disp) /* do nothing */
>
>     Eric> and then recompile gestalt.
>
> This works.

So it's either a problem in the way I use Boehm's finalizer registration
(in particular I pass a function pointer where a void* is expected!),
or a problem in Boehm's finalization, or a problem in the implementation
of `dispose'. I would favor the first alternative considering that what
you say below.

> But note that I do not have the problem on my 32-bit system (I
> tried both before and after an svn update), so it might be a problem
> with Boehm gc 7.0 on 64-bit systems. I will try a newer version.

OK.

--
Eric Bezault
mailto:ericb@...
http://www.gobosoft.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Colin Paul Adams
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
>>>>> "Eric" == Eric Bezault <ericb@...> writes:

    Eric> So it's either a problem in the way I use Boehm's finalizer
    Eric> registration (in particular I pass a function pointer where
    Eric> a void* is expected!), or a problem in Boehm's finalization,
    Eric> or a problem in the implementation of `dispose'. I would
    Eric> favor the first alternative considering that what you say
    Eric> below.

    >> But note that I do not have the problem on my 32-bit system (I
    >> tried both before and after an svn update), so it might be a
    >> problem with Boehm gc 7.0 on 64-bit systems. I will try a newer
    >> version.

That doesn't work (I used the 24th February version of 7.1 alpha).
--
Colin Adams
Preston Lancashire

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Eric Bezault
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
Colin Paul Adams wrote:

>>>>>> "Eric" == Eric Bezault <ericb@...> writes:
>
>     Eric> So it's either a problem in the way I use Boehm's finalizer
>     Eric> registration (in particular I pass a function pointer where
>     Eric> a void* is expected!), or a problem in Boehm's finalization,
>     Eric> or a problem in the implementation of `dispose'. I would
>     Eric> favor the first alternative considering that what you say
>     Eric> below.
>
>     >> But note that I do not have the problem on my 32-bit system (I
>     >> tried both before and after an svn update), so it might be a
>     >> problem with Boehm gc 7.0 on 64-bit systems. I will try a newer
>     >> version.
>
> That doesn't work (I used the 24th February version of 7.1 alpha).
Please try to use the two files attached.

--
Eric Bezault
mailto:ericb@...
http://www.gobosoft.com

/*
        description:

                "C functions used to access garbage collector facilities"

        system: "Gobo Eiffel Compiler"
        copyright: "Copyright (c) 2007-2008, Eric Bezault and others"
        license: "MIT License"
        date: "$Date: 2008-01-30 14:23:49 +0100 (Wed, 30 Jan 2008) $"
        revision: "$Revision: 6283 $"
*/

#ifndef GE_GC_C
#define GE_GC_C

#ifdef EIF_BOEHM_GC
/*
 * Call dispose routine `disp' on object `C'.
 */
void GE_boehm_dispose(void* C, void *disp) {
        ((void (*)(EIF_REFERENCE))disp)((EIF_REFERENCE)C);
}
#endif

#endif

/*
        description:

                "C functions used to access garbage collector facilities"

        system: "Gobo Eiffel Compiler"
        copyright: "Copyright (c) 2007-2008, Eric Bezault and others"
        license: "MIT License"
        date: "$Date: 2008-02-07 09:56:06 +0100 (Thu, 07 Feb 2008) $"
        revision: "$Revision: 6286 $"
*/

#ifndef GE_GC_H
#define GE_GC_H

#ifdef EIF_BOEHM_GC

/*
        Use the Boehm garbage collector.
        See:
                http://en.wikipedia.org/wiki/Boehm_GC
                http://www.hpl.hp.com/personal/Hans_Boehm/gc/
*/

#include "gc.h"

/*
        GC initialization.
*/
#define GE_init_gc() GC_INIT(); GC_enable_incremental()

/*
        Memory allocation.
*/

/*
 * GE_alloc allocates memory that can contain pointers to collectable objects.
 */
#define GE_alloc(x) GE_null(GC_MALLOC(x))

/*
 * When defined, GE_alloc_cleared means that GE_alloc makes sure that the allocated memory is zeroed.
 */
#define GE_alloc_cleared

/*
 * GE_alloc_atomic allocates memory that does not contain pointers to collectable objects.
 */
#define GE_alloc_atomic(x) GE_null(GC_MALLOC_ATOMIC(x))

/*
 * When defined, GE_alloc_atomic_cleared means that GE_alloc_atomic makes sure that the allocated memory is zeroed.
 */
/* #define GE_alloc_atomic_cleared */

/*
        Dispose
*/

/*
 * Call dispose routine `disp' on object `C'.
 */
extern void GE_boehm_dispose(void*, void*);

/*
 * Register dispose routine `disp' to be called on object `obj' when it will be collected.
 */
#define GE_register_dispose(obj, disp) GC_REGISTER_FINALIZER((void*)(obj), (void (*) (void*, void*)) &GE_boehm_dispose, (void*)(disp), NULL, NULL)

#else

/*
        No garbage collector.
*/

/*
        GC initialization.
*/
#define GE_init_gc() /* do nothing */

/*
        Memory allocation.
*/

/*
 * GE_alloc allocates memory that can contain pointers to collectable objects.
 */
#define GE_alloc(x) GE_null(malloc(x))

/*
 * When defined, GE_alloc_cleared means that GE_alloc makes sure that the allocated memory is zeroed.
 */
/* #define GE_alloc_cleared */

/*
 * GE_alloc_atomic allocates memory that does not contain pointers to collectable objects.
 */
#define GE_alloc_atomic(x) GE_null(malloc(x))

/*
 * When defined, GE_alloc_atomic_cleared means that GE_alloc_atomic makes sure that the allocated memory is zeroed.
 */
/* #define GE_alloc_atomic_cleared */

/*
        Dispose
*/

/*
 * Register dispose routine `disp' to be called on object `obj' when it will be collected.
 */
#define GE_register_dispose(obj, disp) /* do nothing */

#endif


/*
        Access to objects, useful with GCs which move objects in memory.
        This is not the case here, since the Boehm GC is not a moving GC.
*/

/* Access object through hector */
#define eif_access(obj) (obj)
/* Freeze memory address */
#define eif_freeze(obj) (obj)
/* The C side adopts an object */
#define eif_adopt(obj) (obj)
/* The C side protects an object */
#define eif_protect(obj) (obj)
/* The C side weans adopted object */
#define eif_wean(obj) (obj)
/* Forget a frozen memory address */
#define eif_unfreeze(obj)
/* Always frozen since they do not move */
#define eif_frozen(obj) 1
/* Always frozen since they do not move */
#define spfrozen(obj) 1

#endif

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Colin Paul Adams
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
Are these two alternative versions of ge_gc.h to try, or are they two
different files?
--
Colin Adams
Preston Lancashire

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Eric Bezault
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
Colin Paul Adams wrote:
> Are these two alternative versions of ge_gc.h to try, or are they two
> different files?

There is ge_gc.h and ge_gc.c. They should be tried together.

--
Eric Bezault
mailto:ericb@...
http://www.gobosoft.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Colin Paul Adams
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
In reply to this post by Eric Bezault
>>>>> "Eric" == Eric Bezault <ericb@...> writes:

    Eric> Please try to use the two files attached.

Same problem as before.
--
Colin Adams
Preston Lancashire

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Eric Bezault
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
Colin Paul Adams wrote:
>>>>>> "Eric" == Eric Bezault <ericb@...> writes:
>
>     Eric> Please try to use the two files attached.
>
> Same problem as before.

Now, if you remove the line 21:

   ((void (*)(EIF_REFERENCE))disp)((EIF_REFERENCE)C);

in the file ge_gc.c that I sent you?

--
Eric Bezault
mailto:ericb@...
http://www.gobosoft.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Colin Paul Adams
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
>>>>> "Eric" == Eric Bezault <ericb@...> writes:

    Eric> Colin Paul Adams wrote:
    >>>>>>> "Eric" == Eric Bezault <ericb@...> writes:
    >>
    Eric> Please try to use the two files attached.
    >>
    >> Same problem as before.

    Eric> Now, if you remove the line 21:

    Eric>   ((void (*)(EIF_REFERENCE))disp)((EIF_REFERENCE)C);

    Eric> in the file ge_gc.c that I sent you?

Now it works again.
--
Colin Adams
Preston Lancashire

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Eric Bezault
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
Colin Paul Adams wrote:

>>>>>> "Eric" == Eric Bezault <ericb@...> writes:
>
>     Eric> Colin Paul Adams wrote:
>     >>>>>>> "Eric" == Eric Bezault <ericb@...> writes:
>     >>
>     Eric> Please try to use the two files attached.
>     >>
>     >> Same problem as before.
>
>     Eric> Now, if you remove the line 21:
>
>     Eric>   ((void (*)(EIF_REFERENCE))disp)((EIF_REFERENCE)C);
>
>     Eric> in the file ge_gc.c that I sent you?
>
> Now it works again.

OK. So I wanted to be smart, and as a consequence mix void* and
function pointers. I guess I will have to use brute force and
generate an extra C function for each `dispose' routine in order
to accept an extra argument.

Can you do one more test? Replace in ge_gc.h the line 68:

#define GE_register_dispose(obj, disp)
GC_REGISTER_FINALIZER((void*)(obj), (void (*) (void*, void*))
&GE_boehm_dispose, (void*)(disp), NULL, NULL)

by:

#define GE_register_dispose(obj, disp)
GC_REGISTER_FINALIZER((void*)(obj), (void (*) (void*, void*)) disp,
NULL, NULL, NULL)

--
Eric Bezault
mailto:ericb@...
http://www.gobosoft.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Colin Paul Adams
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
>>>>> "Eric" == Eric Bezault <ericb@...> writes:

    Eric> Can you do one more test? Replace in ge_gc.h the line 68:

Is that with or without the erased line 21 in ge_gc.c?
--
Colin Adams
Preston Lancashire

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list
gobo-eiffel-develop@...
https://lists.sourceforge.net/lists/listinfo/gobo-eiffel-develop
Eric Bezault
Re: Gestalt now crashes when compiled with gec only
Reply Threaded More
Print post
Permalink
Colin Paul Adams wrote:
>>>>>> "Eric" == Eric Bezault <ericb@...> writes:
>
>     Eric> Can you do one more test? Replace in ge_gc.h the line 68:
>
> Is that with or without the erased line 21 in ge_gc.c?

Either way, it will not be called anyway.

--
Eric Bezault
mailto:ericb@...
http://www.gobosoft.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gobo-eiffel-develop mailing list