Re: profiling broken on RELENG_7/i386 (fwd)

From: Dmitry Morozovsky <marck_at_rinet.ru>
Date: Fri, 4 Jul 2008 13:35:51 +0400 (MSD)
Colleagues,

As HEAD is affected too, I think discussion should be moved to -current_at_

The bug is triggered by the following test program:


#include <unistd.h>

int
main(int argc, char *argv[])
{
        int ch;

        while ((ch = getopt(argc, argv, "")) != -1) {
        }

        return (0);
}


Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer:                                 marck_at_FreeBSD.org ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck_at_rinet.ru ***
------------------------------------------------------------------------

---------- Forwarded message ----------
Date: Fri, 4 Jul 2008 13:26:57 +0400 (MSD)
From: Dmitry Morozovsky <marck_at_rinet.ru>
To: freebsd-hackers_at_freebsd.org
Cc: oleg_at_rinet.ru
Subject: Re: profiling broken on RELENG_7/i386 

On Fri, 4 Jul 2008, Dmitry Morozovsky wrote:

DM> It seems we step on a bug in gcc in RELENG_7/i386
DM> 
DM> It is triggered at least by profiling program which uses getopt(3):

[snip]

DM> other ref platforms seem to be ok. 

Nah, HEAD/i386 also has this bug, though backtrace is a bit different:

marck_at_ref8-i386:~/tmp/gprof> make clean all
rm -f test test.o
Warning: Object directory not changed from original 
/dumpster/home/marck/tmp/gprof
cc -O2 -pipe -march=prescott -g -pg -fstack-protector  -c test.c
cc -O2 -pipe -march=prescott -g -pg -fstack-protector   -o test test.o
marck_at_ref8-i386:~/tmp/gprof> ./test
Segmentation fault (core dumped)
marck_at_ref8-i386:~/tmp/gprof> gdb test test.core
GNU gdb 6.1.1 [FreeBSD]
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 "i386-marcel-freebsd"...
Core was generated by `test'.
Program terminated with signal 11, Segmentation fault.
#0  0x08048242 in getopt ()
(gdb) bt
#0  0x08048242 in getopt ()
#1  0x080481f9 in main (argc=0, argv=0x0) at test.c:9
(gdb) l
9               while ((ch = getopt(argc, argv, "")) != -1) {
10              }
11
12              return (0);
13      }
(gdb) marck_at_ref8-i386:~/tmp/gprof> truss ./test
__sysctl(0xbf7fe728,0x2,0x8071ff0,0xbf7fe730,0x0,0x0) = 0 (0x0)
__sysctl(0xbf7fe67c,0x2,0x80776a8,0xbf7fe684,0x0,0x0) = 0 (0x0)
__sysctl(0xbf7fe6cc,0x2,0xbf7fe6d8,0xbf7fe6dc,0x0,0x0) = 0 (0x0)
readlink("/etc/malloc.conf","DMaj",1024)         = 4 (0x4)
issetugid(0x806c233,0xbf7fe737,0x400,0xbf7fe730,0x0,0x0) = 0 (0x0)
break(0x8100000)                                 = 0 (0x0)
break(0x8200000)                                 = 0 (0x0)
sysarch(0xa,0xbf7feba0,0xbf7febc8,0x8048555,0x8102040,0xc) = 0 (0x0)
break(0x822c69c)                                 = 0 (0x0)
profil(0x8208988,0x11e8a,0x8048148,0x8000,0x0,0x0) = 0 (0x0)
__sysctl(0xbf7feb9c,0x2,0x8072140,0xbf7feba4,0x0,0x0) = 0 (0x0)
SIGNAL 11 (SIGSEGV)



{HEAD,RELENG_7}/amd64 and RELENG_6/* seem to perform well


Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer:                                 marck_at_FreeBSD.org ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck_at_rinet.ru ***
------------------------------------------------------------------------
_______________________________________________
freebsd-hackers_at_freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe_at_freebsd.org"
Received on Fri Jul 04 2008 - 07:35:53 UTC

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