users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can we use a malloc-debugger for a gprolog/C++ program?


From: Erick Alphonse
Subject: Re: can we use a malloc-debugger for a gprolog/C++ program?
Date: Fri, 12 Jan 2001 21:33:43 -0500

Erick Alphonse wrote:
> 
> Hello,
> 
> The problem of to be unable to use malloc-debuggers is solved at least
> in the last unstable gprolog version, as gprolog no longer overrides
> malloc.

Using a version of gprolog, which no longer overrides malloc (actually
the 1.2.1 modified version as my program crashes at the very top level
with the unstable ones), I can successfully link my program with
libraries like libefence.a or libyamd.a. Also they trap  gprolog's
malloc calls. Unfortunately, gprolog seems buggy as my standalone
executable segfaults in the prolog code part:

  Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens
<address@hidden>
Loading examples...   DONE

Program received signal SIGSEGV, Segmentation fault.
0x805aa81 in Copy_Contiguous_Term () at subsomption.cpp:101
Current language:  auto; currently c++
(xxgdb) up
#1  0x7e700281 in ?? ()
(xxgdb) up
#2  0x808ceb0 in Call_Next () at subsomption.cpp:101
(xxgdb) up
#3  0x808cb41 in Find_Linked_Objects () at subsomption.cpp:101
(xxgdb) up
Initial frame selected; you cannot go up.

subsomption.cpp means nothing, as I only have one external predicate in
C++ which is not reached.

I would like to know if it is possible to link the gprolog objects
compiled by gplc with the malloc overrided by gprolog 1.2.1 and my c++
object files with the malloc provided by libefence.a. Or maybe there is
another solution?

Thank you for your help and time,
Erick Alphonse.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]