Compiler problem?
Installed gcc3.03 from sunfreeware, and recompiled, now works.
----- Original Message -----
From: "David Valentine" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 9:50 PM
Subject: Re: [AOLSERVER] Porting (aol 2.2 to aol 3.3.1)
> And, what's the definition of 'box'? I assume it's
> char box[1500], to correspond with your other email
> saying 'char out[1500]'?
>
> same problem, simpler point to crash at, since I already worked around the
> code used in that example. The workaround is to split it into two sprintf
> lines.
>
> char out[1500];
> char box[500];
> float north_in, south_in, east_in, west_in;
> ...
> north_in = atof(Ns_SetIGet(input, "north"));
> south_in = atof(Ns_SetIGet(input, "south"));
> west_in = atof(Ns_SetIGet(input, "west"));
> east_in = atof(Ns_SetIGet(input, "east"));
> ...
> sprintf(box, "HG_BOX(%f,%f,%f,%f)",
> west_in,south_in,east_in,north_in);
>
> ------------------------------------------------------
> box = '\000' <repeats 499 times>
> north_in = 90
> south_in = -90
> east_in = 180
> west_in = -180
>
> --------------------------------------------------------------------------
--
> Breakpoint 1 at 0xfe761c3c: file gazserver.c, line 158.
> (gdb) continue
> Continuing.
> [New LWP 8 ]
> [New LWP 9 ]
> [New Thread 9 (LWP 9)]
> [Switching to Thread 9 (LWP 9)]
>
> Breakpoint 1, gazserver (context=0x0, conn=0x1d0240) at gazserver.c:158
> 158 sprintf(box, "HG_BOX(%f,%f,%f,%f)",
> (gdb) bt
> #0 gazserver (context=0x0, conn=0x1d0240) at gazserver.c:158
> #1 0x4df00 in ?? ()
> #2 0x584f0 in ?? ()
> #3 0x57b74 in ?? ()
> #4 0x13c900 in ?? ()
> (gdb) info locals
> dbname = 0xfe763e58 "gazbucket"
> input = (Ns_Set *) 0x20c4c8
> dbh = {0x96, 0x20c300, 0x14a638}
> row = (Ns_Set *) 0xfe6c1970
> row1 = (Ns_Set *) 0xfe6c18ef
> row2 = (Ns_Set *) 0x21a888
> i = 13
> j = 205840
> pagesize = 20
> [snip a bunch of arrays]
> sql2 = '\000' <repeats 1499 times>
> ---Type <return> to continue, or q <return> to quit---
> out = '\000' <repeats 1499 times>
> box = '\000' <repeats 499 times>
> tstart = {tv_sec = 0, tv_usec = 0}
> tend = {tv_sec = 0, tv_usec = 0}
> tdif = 0
> north_in = 90
> south_in = -90
> east_in = 180
> west_in = -180
> usecoord_in = 1
> assigned_in = 0
> page_num = 0
> total = 0
> last = 0
> loc_sec = 1
> text_sec = 0
> id_sec = 0
> type_sec = 0
> b_type_in = 0x0
> topical_in = 0x0
> topical_type_in = 0x0
> identifier_in = 0x0
> identifier_type_in = 0x0
> ----- Original Message -----
> From: "Dossy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 24, 2002 9:05 PM
> Subject: Re: [AOLSERVER] Porting (aol 2.2 to aol 3.3.1)
>
>
> > On 2002.01.24, David Valentine <[EMAIL PROTECTED]> wrote:
> > > (gdb) frame 0
> > > #0 0xfe761b90 in gazserver (context=0x0, conn=0x1d0220) at
> gazserver.c:158
> > > 158 sprintf(box, "HG_BOX(%f,%f,%f,%f)",
> > > (gdb) backtrace
> > > #0 0xfe761b90 in gazserver (context=0x0, conn=0x1d0220) at
> gazserver.c:158
> > > #1 0x4df00 in ?? ()
> > > #2 0x584f0 in ?? ()
> > > #3 0x57b74 in ?? ()
> > > #4 0x13c900 in ?? ()
> >
> > Could you set a breakpoint on line 157, and inspect the 4
> > variables that are to be %f'ed into variable 'box'? Tell
> > us what their contents are ... I'm thinking that one of
> > them is either a null pointer, or you're overrunning the
> > 'box' variable.
> >
> > And, what's the definition of 'box'? I assume it's
> > char box[1500], to correspond with your other email
> > saying 'char out[1500]'?
> >
> > -- Dossy
> >
> > --
> > Dossy Shiobara mail: [EMAIL PROTECTED]
> > Panoptic Computer Network web: http://www.panoptic.com/
> > "He realized the fastest way to change is to laugh at your own
> > folly -- then you can let go and quickly move on." (p. 70)
> >
>