🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #5932

gcc bug

#5932
From: Alexander Loksh
Date: Thu, 30 Jan 1997 00:00
28 lines
1069 bytes
Dear sir, 
I am running gcc version 2.7.2 on the PC Linix. 
The code 
#include <stdio.h>
#include <errno.h>
#define MAX_BIGSTRINGLEN 1024

main()
{
   char *tmp_file = NULL;
   tmp_file = (char *)malloc(MAX_BIGSTRINGLEN-13 );
   if(getwd(tmp_file) == 0)
     {
       perror("getcwd");
     }
}

crashes in getwd().

Meanwhile when the MAX_BIGSTRINGLEN is not too large the code is working
properly. Attempt to figure out what the minimum acceptable value for  
MAX_BIGSTRINGLEN was failed since in different test cases the minimum
acceptable value was changed.

Truly yours 
  Alexander Loksh
  E-mail loksh@cae.ca
Technical Details
Message-ID: <9701302157.AA43005@obelix.cae.ca>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,ed2d5b5ac8005fda,start
X-Google-Attributes: gid113d02,public
From: loksh@cae.ca (Alexander Loksh)
Subject: gcc bug
Date: 1997/01/30
Message-ID: <9701302157.AA43005@obelix.cae.ca>
X-Deja-AN: 213443145
sender: bug-gcc-request@prep.ai.mit.edu
x-gateway: relay2.UU.NET from bug-gcc to gnu.gcc.bug; Fri, 31 Jan 1997 00:13:20 EST
newsgroups: gnu.gcc.bug