Compiled results don't match for CURRENT and 7.0-RELEASE on amd64 / gdb weirdness with CURRENT

From: Garrett Cooper <yanefbsd_at_gmail.com>
Date: Sun, 23 Nov 2008 15:08:29 -0800
Hi guys,

      I'm running into a weird bug where the following compiled
results don't match (and this could potentially be a regression).

      System 1: FreeBSD 8-CURRENT, synced up as of 3 days ago. Machine
uses ULE and runs off a dual-core Intel proc.
      System 2: FreeBSD 7.0-RELEASE, no patches, SMP enabled. Machine
is a single-proc VMware Fusion image.

      I've made a few changes to hexdump in trying to triage the bugs
under my name, and I noticed a difference in behavior between
8-CURRENT and 7.0-RELEASE, in particular the fact that 8-CURRENT
doesn't appear to assert a != NULL statement, like on the 7.0-RELEASE
machine, but instead chokes on an earlier statement. The patch can be
found at: <http://pastebin.com/f410b88ca>. OSX does the same thing as
the 7.0-RELEASE machine as well, which is interesting, but there are a
lot of points of variability with that machine, compared to the
CURRENT box and the 7.0-RELEASE VM (compiler version, binutils
versions, libc version, etc), and I don't want to go compare a vanilla
Mac with FreeBSD.
      I'm syncing up the 7.0-RELEASE's sources to 7-RELEASE and we'll
see if that fixes anything, but I'd be really curious if anyone else
notes this behavior with different synced versions of CURRENT.
      Also, there was some gdb weirdness with the machine running
CURRENT where the watch stack pointer kept on hopping around on my
machine whenever I breaked on a point in the source and hit continue.
I'm not sure if it's an issue with SMP, ULE, or both. I'll try
rebuilding the kernel without SMP and see what happens.
Thanks,
-Garrett

=====================
8-CURRENT:
=====================

INCOMING! `"%07.7_Ax\n"'
P (0): `"%07.7_Ax\n"'
=================
LEN: 10
NEWP: "
FMT: `%07.7_Ax\n'
P (1): `'
=================
BC: `0'
IC: `1'
=================
INCOMING! `"%07.7_ax " 8/2 "%04x " "\n"'
P (0): `"%07.7_ax " 8/2 "%04x " "\n"'
=================
LEN: 9
NEWP: " 8/2 "%04x " "\n"
FMT: `%07.7_ax '
P (1): `8/2 "%04x " "\n"'
=================
BC: `2'
IC: `8'
=================
P (0): `"%04x " "\n"'
=================
LEN: 5
NEWP: " "\n"
FMT: `%04x '
P (1): `"\n"'
=================
BC: `0'
IC: `1'
=================
P (0): `"\n"'
=================
LEN: 2
NEWP: "
FMT: `\n'
P (1): `'
=================
BC: `0'
IC: `1'
=================
hexdump: Bad format provided: `Ax\n'

=====================
7-RELEASE output:
=====================

INCOMING! `"%07.7_Ax\n"'
P (0): `"%07.7_Ax\n"'
=================
LEN: 10
NEWP: "
FMT: `'
P (1): `'
=================
BC: `0'
IC: `1'
=================
INCOMING! `"%07.7_ax " 8/2 "%04x " "\n"'
P (0): `"%07.7_ax " 8/2 "%04x " "\n"'
=================
LEN: 9
NEWP: " 8/2 "%04x " "\n"
FMT: `%07.7_ax '
P (1): `8/2 "%04x " "\n"'
=================
BC: `2'
IC: `8'
=================
P (0): `"%04x " "\n"'
=================
LEN: 5
NEWP: " "\n"
FMT: `'
P (1): `"\n"'
=================
BC: `0'
IC: `1'
=================
P (0): `"\n"'
=================
LEN: 2
NEWP: "
FMT: `'
P (1): `'
=================
BC: `0'
IC: `1'
=================
fmt:
Assertion failed: (pr != NULL), function rewrite, file parse.c, line 559.
Abort trap: 6 (core dumped)
Received on Sun Nov 23 2008 - 22:08:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:38 UTC