Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 20442: /trunk/tools/lemon/ /trunk/to

From: "Martin Mathieson" <martin.r.mathieson@xxxxxxxxxxxxxx>
Date: Tue, 16 Jan 2007 16:01:57 +0000
Is this useful?

Martin

GNU gdb 6.2.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-suse-linux"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

(gdb) run
Starting program: /users/martinm/wireshark/.libs/lt-wireshark
[Thread debugging using libthread_db enabled]
[New Thread 1103262656 (LWP 23272)]
Detaching after fork from child process 23283.
Detaching after fork from child process 23284.
*** glibc detected *** double free or corruption: 0x085761d0 ***

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1103262656 (LWP 23272)]
0x41957ec9 in free () from /lib/tls/libc.so.6
(gdb) bt
#0  0x41957ec9 in free () from /lib/tls/libc.so.6
#1  0x417b89d2 in g_free () from /opt/gnome/lib/libglib-2.0.so.0
#2  0x4037f192 in yy_destructor (yymajor=107 'k', yypminor=0x8587430)
at dtd_grammar.lemon:63
#3  0x4037f993 in DtdParse (yyp=0x85873b0, yymajor=16,
yyminor=0x6c696d6b, bd=0x6c696d6b) at dtd_grammar.lemon:216
#4  0x40380986 in Dtd_Parse_lex () at dtd_parse.l:274
#5  0x4038143c in dtd_parse (s=0x6c696d6b) at dtd_parse.l:334
#6  0x40a30056 in proto_register_xml () at packet-xml.c:1145
#7  0x40a3788e in register_all_protocols () at register.c:691
#8  0x403993ff in proto_init (register_all_protocols=0x805fe8c
<register_all_protocols>, register_all_protocol_handoffs=0x8060e3c
<register_all_protocol_handoffs>)
   at proto.c:320
#9  0x40384337 in epan_init (register_all_protocols=0x6c696d6b,
register_all_handoffs=0x6c696d6b, report_failure=0x6c696d6b,
report_open_failure=0x6c696d6b,
   report_read_failure=0x6c696d6b) at epan.c:97
#10 0x080826db in main (argc=1, argv=0xbfffdad4) at main.c:2367
(gdb) fr 2
#2  0x4037f192 in yy_destructor (yymajor=107 'k', yypminor=0x8587430)
at dtd_grammar.lemon:63
63                      if ($$->text) g_free($$->text);
(gdb) p *yyminor
No symbol "yyminor" in current context.
(gdb) p *yypminor
$1 = {yy0 = 0x8583d38, yy29 = 0x8583d38, yy44 = 0x8583d38
"smil8=X\b:10", yy59 = 0x8583d38, yy81 = 140000568}
(gdb)

On 1/16/07, Luis Ontanon <luis.ontanon@xxxxxxxxx> wrote:
They commited what we got in rev 20447.

As this does not happen to me (I'm running with MallocBadFreeAbort) I
would need a a backtrace where the yyminor value passed to DtdParse()
shows up.

can you -DDEBUG_DTD_PARSER and send in the trace for the parser.

Thanks.

Luis

On 1/16/07, Douglas Pratley <Douglas.pratley@xxxxxxxxxx> wrote:
> I get a similar crash under Windows. I'm having trouble reverting back
> to a "good" baseline without losing today's work, so it would be great
> if this could be fixed... I'm afraid I can't work out quite what the
> dependencies are here.
>
> Cheers
>
> Doug
>
> -----Original Message-----
> From: wireshark-dev-bounces@xxxxxxxxxxxxx
> [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Jaap Keuter
> Sent: 16 January 2007 12:27
> To: Developer support list for Wireshark
> Subject: Re: [Wireshark-dev] [Wireshark-commits] rev 20442:
> /trunk/tools/lemon/ /trunk/tools/lemon/: lemon.c
>
> Hi,
>
> Maybe not, since it seems to have broken the program completely.
>
> (gdb) run
> Starting program: /home/me/src/wireshark/trunk/.libs/lt-tshark
> Failed to read a valid object file image from memory.
> [Thread debugging using libthread_db enabled]
> [New Thread -1233094432 (LWP 25812)]
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1233094432 (LWP 25812)]
> 0xb69c75ad in free () from /lib/tls/i686/cmov/libc.so.6
> (gdb) bt
> #0  0xb69c75ad in free () from /lib/tls/i686/cmov/libc.so.6
> #1  0xb6b3ab31 in g_free () from /usr/lib/libglib-2.0.so.0
> #2  0xb6fafa13 in yy_destructor (yymajor=<value optimized out>,
> yypminor=0x0) at ./dtd_grammar.lemon:63
> #3  0xb6fb0685 in DtdParse (yyp=0x8371f40, yymajor=6, yyminor=0x8376f00,
> bd=0x8378888) at ./dtd_grammar.lemon:1
> #4  0xb6fb163b in Dtd_Parse_lex () at ./dtd_parse.l:275
> #5  0xb6fb221c in dtd_parse (s=0x8378f20) at ./dtd_parse.l:335
> #6  0xb76620f5 in proto_register_xml () at packet-xml.c:1145
> #7  0xb766b3b5 in register_all_protocols () at register.c:691
> #8  0xb6fcd66f in proto_init (register_all_protocols=0x804e31c
> <register_all_protocols@plt>,
>     register_all_protocol_handoffs=0x804e75c
> <register_all_protocol_handoffs@plt>) at proto.c:320
> #9  0xb6fb60d7 in epan_init (register_all_protocols=0x804e31c
> <register_all_protocols@plt>,
>     register_all_handoffs=0x804e75c
> <register_all_protocol_handoffs@plt>, report_failure=0x8060dc0
> <failure_message>,
>     report_open_failure=0x80610a0 <open_failure_message>,
> report_read_failure=0x8061150 <read_failure_message>) at epan.c:97
> #10 0x08062fc1 in main (argc=1, argv=0xbf80a4d4) at tshark.c:781
>
> Thanx,
> Jaap
>
> On Tue, 16 Jan 2007, Joerg Mayer wrote:
>
> > On Mon, Jan 15, 2007 at 07:48:06PM +0000, lego@xxxxxxxxxxxxx wrote:
> > >
> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=20442
> > >
> > > User: lego
> > > Date: 2007/01/15 07:48 PM
> > >
> > > Log:
> > >  Fix a major leakage of token minors in lemon generated parsers due
> to the fact that lemon was not genmerating destructor code for elements
> in the RHS of rules without C-code.
> > >
> >
> > Can you please provide feedback to the lemon author?
> >
> >  thanks
> >        Joerg
> >
>
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-dev
>
>
>
> This message should be regarded as confidential. If you have received this
email in error please notify the sender and destroy it immediately.
> Statements of intent shall only become binding when confirmed in hard copy
by an authorised signatory.  The contents of this email may relate to
dealings with other companies within the Detica Group plc group of
companies.
>
> Detica Limited is registered in England under No: 1337451.
>
> Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP,
England.
>
>
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-dev
>


--
This information is top security. When you have read it, destroy yourself.
-- Marshall McLuhan
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev