roxen.lists.pike.general

Subject Author Date
Re: Got a trace (Re: Identifier reference index 36 out of range Henrik_Grubbström <grubba[at]roxen[dot]com> 24-06-2009
 0..29)
On Mon, 22 Jun 2009, Stephen R. van den Berg wrote:

> Stephen R. van den Berg wrote:
>>>>> Identifier reference index 36 out of range 0..29
>>>>> Identifier reference index 36 out of range 0..29
>
> This is the trace I got:
[...]
> #5  0x081d8ee5 in get_identifier_line (p=0x8591710, fun=36, linep=0x8b01c58)
>    at /data/src/gpike/src/program.c:7007
> #6  0x081e9dc1 in low_get_function_line (o=0x8b6b260, fun=36, linep=0x8b01c58)
>    at /data/src/gpike/src/program.c:6988

It seems I'm blind...
The above trace excerpt indicates that the problem lies with generating 
line number information for a prototype. A closer look at 
low_get_function_line() gives that the wrong program was given as the 
first argument to get_identifier_line().

Test case:

   class A { void foo(); }
   class B { int gazonk; inherit A; void bar() { foo(); } }
   int main()
   {
     werror("BT: %s\n", describe_backtrace(catch{ B()->bar(); }));
   }

Fixed.

> It appears that it is trying to print a pike stacktrace or error message.
> Keep in mind that I am trying to insert into a non-existent MySQL table,
> and this is the error message trying to get out.
> I'm not quite sure where to look now.  Looks like a mishap in the mysql.c
> glue.  Ideas, anyone?
> -- 
> Sincerely,
>           Stephen R. van den Berg.

--
Henrik Grubbström					<grubba[at]roxen.com>
Roxen Internet Software AB