This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
bus error?
- To: gcc at gcc dot gnu dot org
- Subject: bus error?
- From: Min Xu <mxu at cae dot wisc dot edu>
- Date: Mon, 27 Mar 2000 16:46:08 -0600
- Reply-To: mxu at cae dot wisc dot edu
Hi everyone,
I am sending this email not only because I am confused about bus
error, but also
this question comes up from gcc.
Recently, I just wrote a small program(7k lines) which used the "set"
and "map"
objects from STL a lot. On my linux(debian) box, the program runs well
for both
cases that it is compiled with optimization of unoptimization
option.(-O2 or not).
But on another solaris machine, only the unoptimized version works well
and
the optimized version will cause a bus error. I was told by one unix
expert
that the problem maybe caused by failing to correctly manager the memory
in
my program.
But here I am just wondering why gcc has this behavior on
optimization?
I am sure the two system has the same gcc(2.95.2), why there was not a
bus error
on the linux machine?
Please excuse my stupid question, I am novice.
Owen