Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* cxx don't check array bounds bounds in a c++ program
@ 2003-10-27 10:58 Jose Luis Fern?ndez D?az
  0 siblings, 0 replies; only message in thread
From: Jose Luis Fern?ndez D?az @ 2003-10-27 10:58 UTC (permalink / raw)


Hi,

I have the next program (foo.c): 


#include <signal.h>
#include <stdio.h>

void handler(int i1)
{
  printf("handler, i= %d\n", i1);
}

void main(void)
{
  int a[10];
  int c=10;

  signal(SIGTRAP, handler);

  a[c]=-1;
}

I run the next commands:

sqocfms01:vodafone:/tmp>cxx -check_bounds foo.c
sqocfms01:vodafone:/tmp>a.out
handler, i= 5
sqocfms01:vodafone:/tmp>cp foo.c foo.cxx
sqocfms01:vodafone:/tmp>cxx -check_bounds foo.cxx
sqocfms01:vodafone:/tmp>a.out


How can i check bounds in a c++ program on tru64?

Are there any free tool?. I know thrid degree, but it don't check array bounds.

Thanks in advance,
Jose Luis.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-27 10:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-27 10:58 cxx don't check array bounds bounds in a c++ program Jose Luis Fern?ndez D?az

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox