This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

other/4852: Bug due to interaction between c++, profiling options and rand ()



>Number:         4852
>Category:       other
>Synopsis:       Bug due to interaction between c++, profiling options and rand ()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 10 18:16:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Kartik Agaram
>Release:        gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
Linux 2.2.19 i686 unknown
>Description:
Compiling a .cc file containing a call to rand ()
with the options -a -fprofile-arcs causes the resulting binary
to segfault on exit.
>How-To-Repeat:
$ gcc -a -fprofile-arcs x.cc
$ a.out
Segmentation fault
$ gdb a.out
(gdb) r
Starting program: /v/hank/v117/akkartik/temp/a.out

Program received signal SIGSEGV, Segmentation fault.
0x8048bd6 in __bb_exit_func () at ../../../gcc/gcc/libgcc2.c:1980
1980    ../../../gcc/gcc/libgcc2.c: No such file or directory.
(gdb) bt
#0  0x8048bd6 in __bb_exit_func () at ../../../gcc/gcc/libgcc2.c:1980
#1  0x2aaebda5 in exit () from /lib/libc.so.6
#2  0x2aae3a48 in __libc_start_main () from /lib/libc.so.6
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="x.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="x.cc"

ZXh0ZXJuICJDIiB7CglpbnQgcmFuZCAoKSA7Cn0KCnZvaWQgUmFuZG9tICgpIHsKCXJhbmQgKCkg
Owp9CgppbnQgbWFpbiAoKSB7CglyZXR1cm4gMCA7Cn0K


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]