On Sun, 6 Jun 1999, Marc Tardif wrote:
> The following code should obviously segfault:
Nope. There is no requirement that code segfault. C does not make any
promises that accessing memory that you have not allocated will do
anything.
> #include
> #include
>
> char buffer[4028];
>
> void ma
The following code should obviously segfault:
#include
#include
char buffer[4028];
void main() {
int i;
for (i=0; i<=4028; i++)
buffer[i]='A';
syslog(LOG_ERR, buffer);
}
Now here's the problem:
When compiling with "gcc file.c", the program segfaults.
Whe
2 matches
Mail list logo