gcc 4.2 profiling breaks argv
Simias
simias.n at gmail.co
Sun Aug 5 16:23:53 UTC 2007
Niklas Sorensson <nik at cs.chalmers.se> writes:
> Hi,
>
> following up on the thread started by Nick Frampton yesterday:
>
> I can repeat the problem, although it looks slightly
> different. Instead of crashing when argv is accessed, both argc and
> argv are zero. This behavior is triggered by both gcc 4.2.0 and 4.2.1:
> [...]
I have an other problem with gprof on CURRENT, this time with c++:
===
$ cat test.cc
#include <iostream>
using namespace std;
int main()
{
try {
throw 1;
} catch (int) {
cout << "in catch" << endl;
}
cout << "after catch" << endl;
}
$ c++ test.cc && ./a.out
in catch
after catch
$ c++ -pg test.cc && ./a.out
Abort trap (core dumped)
$
===
I tried with different programs and it seems that it aborts on any
throw'd exception. If nothing is thrown however, the profiling seems to
work as expected.
$ uname -a
FreeBSD simias.hd.free.fr 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue Jul 10
15:39:06 CEST 2007
root at simias.hd.free.fr:/usr/obj/usr/src/sys/SIMKERNEL i386
$ c++ -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.0 20070514 [FreeBSD]
--
Simias
More information about the freebsd-current
mailing list