On May 31, 2009, at 3:31 AM, Bojan Smojver wrote:

On Sat, 2009-05-30 at 23:55 -0700, Sander Temme wrote:
#0  0x000103a7 in send0_pollset (tc=0xbffff508, data=0x0) at
testpoll.c:389

If you stop there and have a look at the vars, anything that GDB doesn't
like? Wrong alignment and such?


I built a new copy with -O0.  Make check gives me:

testpoll : |/bin/sh: line 1: 54775 Bus error (core dumped) ./$prog
Programs failed: testall
make[1]: *** [check] Error 138
make: *** [check] Error 2

#0 0x0001213e in send0_pollset (tc=0xbffff564, data=0x0) at testpoll.c:389 #1 0x000024b4 in abts_run_test (ts=0x1001f0, f=0x12071 <send0_pollset>, value=0x0) at abts.c:168
#2  0x00013303 in testpoll (suite=0x1001f0) at testpoll.c:685
#3  0x00002e4d in main (argc=1, argv=0xbffff5e8) at abts.c:424

That is actually

    ABTS_PTR_EQUAL(tc, s[0], descs[0].desc.s);

Nothing weird in tc:

(gdb) p tc
$1 = (abts_case *) 0xbffff564
(gdb) p *tc
$2 = {
  failed = 1,
  suite = 0x100880
}
(gdb) p *tc->suite
$3 = {
  name = 0x1008a0 "testpoll",
  num_test = 6,
  failed = 0,
  not_run = 0,
  not_impl = 0,
  next = 0x0
}

Socket looks OK:

(gdb) p *s[0]
$7 = {
  pool = 0x804018,
  socketdes = 3,
  type = 2,
  protocol = 0,
  local_addr = 0x8216d0,
  remote_addr = 0x821868,
  timeout = -1,
  local_port_unknown = 0,
  local_interface_unknown = 0,
  remote_addr_unknown = 1,
  options = 0,
  inherit = 0,
  userdata = 0x0
}

Looks like descs has not been filled in:

(gdb) p descs
$8 = (const apr_pollfd_t *) 0x0

Should that be NULL after the poll?

S.

--
[email protected]              http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to