Re: 5.1-RELEASE TODO

From: Luigi Rizzo <rizzo_at_icir.org>
Date: Sun, 1 Jun 2003 02:26:34 -0700
On Sun, Jun 01, 2003 at 03:32:56AM +0200, Bernd Walter wrote:
...
> :)
> And I hoped a programmer who knows the source could find out and fix
> very quickly.

sorry, i missed the offending line number in your previous email.

I think i missed a & in all the first arguments to bcopy in
the src/sbin/ipfw2.c changes :(

this happens at lines 818, 1224, 1461 and 1701. Fortunately
the kernel part seems correct.

In detail, the fix should be the following:

818:
-       bcopy(rule->next_rule, &set_disable, sizeof(set_disable));
+       bcopy(&rule->next_rule, &set_disable, sizeof(set_disable));

1224:
-       bcopy(d->rule, &rulenum, sizeof(rulenum));
+       bcopy(&d->rule, &rulenum, sizeof(rulenum));

1461:
-               bcopy(((struct ip_fw *)data)->next_rule,
+               bcopy(&((struct ip_fw *)data)->next_rule,

1701:
-                               bcopy(d->rule, &rulenum, sizeof(rulenum));
+                               bcopy(&d->rule, &rulenum, sizeof(rulenum));

	thanks
	luigi


> To be honest - I did not investigate the reason for the failure as
> there were other things on my todo list.
> Well after getting some sleep I will check that again.
> 
> Nevertheless here are the stack traces again - in case someone else can
> identify the cause in the meantime:
> cicely12# ipfw flush
> Are you sure? [yn] y
> 
> Flushed all rules.
> cicely12# ipfw show
> Segmentation fault (core dumped)
> cicely12# May 23 17:09:50 cicely12 kernel: pid 601 (ipfw), uid 0: exited on signal 11 (core dumped)
> cicely12# gdb /usr/obj/var/d3/FreeBSD-2003-05-22/src/sbin/ipfw/ipfw ipfw.core
> GNU gdb 5.2.1 (FreeBSD)
> Copyright 2002 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 "alpha-undermydesk-freebsd"...
> Core was generated by `ipfw'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x120044794 in bcopy ()
> (gdb) bt
> #0  0x120044794 in bcopy ()
> #1  0x120001564 in show_ipfw (rule=0x1200ac000, pcwidth=3, bcwidth=5)
>     at /var/d3/FreeBSD-2003-05-22/src/sbin/ipfw/ipfw2.c:818
> (gdb)
> 
> cicely12# ipfw add allow ip from any to any
> Segmentation fault (core dumped)
> cicely12# May 23 17:13:40 cicely12 kernel: pid 644 (ipfw), uid 0: exited on signal 11 (core dumped)
> cicely12# gdb /usr/obj/var/d3/FreeBSD-2003-05-22/src/sbin/ipfw/ipfw ipfw.core
> GNU gdb 5.2.1 (FreeBSD)
> Copyright 2002 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 "alpha-undermydesk-freebsd"...
> Core was generated by `ipfw'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x120044794 in bcopy ()
> (gdb) bt
> #0  0x120044794 in bcopy ()
> #1  0x120001564 in show_ipfw (rule=0x120099cb0, pcwidth=10, bcwidth=10)
>     at /var/d3/FreeBSD-2003-05-22/src/sbin/ipfw/ipfw2.c:818
> warning: Hit beginning of text section without finding
> warning: enclosing function for address 0x8
> This warning occurs if you are debugging a function without any symbols
> (for example, in a stripped executable).  In that case, you may wish to
> increase the size of the search with the `set heuristic-fence-post' command.
> 
> Otherwise, you told GDB there was a function where there isn't one, or
> (more likely) you have encountered a bug in GDB.
> (gdb)
> 
> -- 
> B.Walter                   BWCT                http://www.bwct.de
> ticso_at_bwct.de                                  info_at_bwct.de
> 
Received on Sun Jun 01 2003 - 00:30:45 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:10 UTC