Re: Trouble with getbyhostname()



Paul Pluzhnikov wrote:
Josef Moellers <josef.moellers@xxxxxxxxxxxxxxxxxxx> writes:

Most likeley gethostbyname is not the cuplrit but something you called
before that.

Something OP called, which corrupted heap.

There are a couple of packages that can assist you in discovering who
this is, e.g. electric fence.

Valgrind is almost certainly a better suggestion than efence.

It certainly is a good tool, but it depends upon the size and runtime of the program.

EFence allows your program to run at almost normal speed (at the expense of a huge virtual address space) while "programs run significantly more slowly under Valgrind" (http://www.valgrind.org/info/about.html) as valgrind interprets your program.

It's a kind of space vs time tradeoff.
--
These are my personal views and not those of Fujitsu Siemens Computers!
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
Company Details: http://www.fujitsu-siemens.com/imprint.html
.



Relevant Pages

  • Re: Trouble with getbyhostname()
    ... Valgrind is almost certainly a better suggestion than efence. ... In order to understand recursion you must first understand recursion. ...
    (comp.os.linux.development.apps)
  • Re: shared lib function calls parameters change by themselves??
    ... Paul Pluzhnikov writes: ... >> The classical buffer overflow. ... Electric Fence is very helpful in ... Also valgrind doesn't support ...
    (comp.os.linux.development.apps)
  • Re: seg fault in vfprintf
    ... there is a bug somewhere in your program. ... >> Try using Valgrind or Electric Fence to locate it. ... I didn't notice he was using MIPS. ...
    (comp.os.linux.development.system)
  • Re: Memory leak detectors
    ... Did you Google for this question before posting? ... I would bet I'd hit ... Valgrind and Electric Fence very quickly... ...
    (comp.programming)
  • Re: Interesting performance quirk.
    ... Alex R. Mosteo wrote: ... That's for the suggestion. ... I've never used valgrind before, ... actually on my to-do list to figure it out in connection with an ...
    (comp.lang.ada)