This is the mail archive of the gcc@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]

bus error?


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


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