From: jose_luis_fdez_diaz@yahoo.es (Jose Luis Fern?ndez D?az)
Subject: cxx don't check array bounds bounds in a c++ program
Date: 27 Oct 2003 02:58:37 -0800 [thread overview]
Message-ID: <f0d1dfb6.0310270258.16e1e0d3@posting.google.com> (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.
reply other threads:[~2003-10-27 10:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox