Subject: ares_init_options failure

ares_init_options failure

From: Søren Dalby Larsen <sdlarsen_at_gmail.com>
Date: Wed, 2 Apr 2008 19:51:10 +0200

Hi.

The following code (from bzflag-2.10) fails with a segfault in
strlen() on my amd64 box:

 /* ask for local "hosts" lookups too */
  static const char* lookups = "fb";
  struct ares_options opts;
  opts.lookups = (char*)lookups; // we cheat, libares uses strdup

  /* start up our resolver */
  int code = ares_init_options (&aresChannel, &opts, ARES_OPT_LOOKUPS);

Any clue why? As far as I can read the c-ares docs the call is ok, but
clealy my box disagrees.

/Søren
Received on 2008-04-02