Hullo,

I have encountered an unaligned access in the function pcap_read. (debug
after message).
The hande received from pcap_open_live() looked valid for the adresrange
of the program (handle == 2003E000). After mushing throught the code the
only place i think it can go wrong is where bhp in the file pcap-bpf.c
is used, where bhp is defined as:

#define bhp ((struct bpf_hdr *)bp)

I do not know how it became unaligned to begin with, or how Freebsd does
its stuff. However you lot probably know a lot more about it than me, so
here I present this problem :-) If this is already a known issue and
someone knows how to get around it or fix it, please do not hesitate to
tell me. If it is something new, I am more than willing to use this
machine to test anything you could come up with to make it work. I do
not know enough about Freebsd or an Alpha to debug this myself, for
now...

I have added the dmesg output to the bottom of the page for completeness
sake.

Floris


-----------
dbg output
-----------

bloodscent# gdb testapp
GNU gdb 4.18
Copyright 1998 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-unknown-freebsd"...
(no debugging symbols found)...
(gdb) run
Starting program: /usr/home/floris/test/testapp
Device: rl0
handle == 537124864
pid 1082 (testapp): unaligned access: va=0x12004008c pc=0x120004748
ra=0x120003e24 op=ldt
pid 1082 (testapp): unaligned access: va=0x120040094 pc=0x12000474c
ra=0x120003e24 op=ldt
pid 1082 (testapp): unaligned access: va=0x12004009c pc=0x120004750
ra=0x120003e24 op=ldt
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x120003e00 in pcap_read ()
(gdb) bt
#0  0x120003e00 in pcap_read ()
#1  0x120004640 in pcap_dispatch ()
#2  0x1200047a4 in pcap_next ()
#3  0x120001e6c in main ()
#4  0x120001658 in _start ()
#5  0x160039ae4 in _rtld_start () from /usr/libexec/ld-elf.so.1

-------
dmesg
-------
bloodscent# dmesg
Copyright (c) 1992-2001 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights
reserved.
FreeBSD 4.4-RELEASE #6: Mon Jan 10 01:06:15 CET 2022
    root@bloodscent:/usr/src/sys/compile/BLOODSCENT
DEC AXPpci
Alpha PC AXPpci33, 166MHz
8192 byte page size, 1 processor.
CPU: LCA Family major=4 minor=2
OSF PAL rev: 0x100090002012d
real memory  = 65036288 (63512K bytes)
avail memory = 57769984 (56416K bytes)
Preloaded elf kernel "kernel" at 0xfffffc00005f8000.
md0: Malloc disk
pci0: <PCI bus> on pcib0
sym0: <810> port 0x10100-0x101ff mem 0x81024100-0x810241ff irq 11 at
device 6.0 on pci0
sym0: No NVRAM, ID 7, Fast-10, SE, parity checking
sym0: interrupting at ISA irq 11
isab0: <Intel 82378ZB PCI to ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
rl0: <RealTek 8139 10/100BaseTX> port 0x10000-0x100ff mem
0x81024000-0x810240ff irq 5 at device 8.0 on pci0
rl0: interrupting at ISA irq 5
rl0: Ethernet address: 00:50:bf:61:98:a0
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pci0: <Matrox MGA Millennium 2064W graphics accelerator> at 11.0 irq 9
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on
isa0
fdc0: interrupting at ISA irq 6
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
atkbd0: interrupting at ISA irq 1
sc0: <System console> on isa0
sc0: VGA <16 virtual consoles, flags=0x200>
mcclock0: <MC146818A real time clock> at port 0x70-0x71 on isa0
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0 at port 0x3f8-0x3ff irq 4 on isa0
sio0: type 16550A
sio0: interrupting at ISA irq 4
sio1: reserved for low-level i/o
ppc0: <Parallel port> at port 0x3bc-0x3c3 irq 7 on isa0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppc0: interrupting at ISA irq 7
Timecounter "alpha"  frequency 166898742 Hz
Waiting 5 seconds for SCSI devices to settle
Mounting root from ufs:/dev/da0a
da0 at sym0 bus 0 target 5 lun 0
da0: <SEAGATE ST15230N 0638> Fixed Direct Access SCSI-2 device
da0: 10.000MB/s transfers (10.000MHz, offset 8), Tagged Queueing Enabled
da0: 4095MB (8386733 512 byte sectors: 255H 63S/T 522C)
cd0 at sym0 bus 0 target 2 lun 0
cd0: <PLEXTOR CD-ROM PX-32TS 1.03> Removable CD-ROM SCSI-2 device
cd0: 10.000MB/s transfers (10.000MHz, offset 8)
cd0: cd present [326150 x 2048 byte records]


-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to