public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/3918: Access violation when using GCC to compile CGI scripts with fread and fgetc functions
@ 2002-02-24 10:06 rodrigc
0 siblings, 0 replies; 2+ messages in thread
From: rodrigc @ 2002-02-24 10:06 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, mlcarey59, nobody
Synopsis: Access violation when using GCC to compile CGI scripts with fread and fgetc functions
State-Changed-From-To: open->closed
State-Changed-By: rodrigc
State-Changed-When: Sun Feb 24 09:34:48 2002
State-Changed-Why:
I don't think this is a gcc problem. Consult
a Windows programming newsgroup for tech support
regarding programming IIS 5.0 web server programs.
Also, your test case does not look correct:
char *filebuffer[BUFFER_SIZE];
should probably be:
char filebuffer[BUFFER_SIZE];
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3918
^ permalink raw reply [flat|nested] 2+ messages in thread
* c/3918: Access violation when using GCC to compile CGI scripts with fread and fgetc functions
@ 2001-08-02 16:36 mlcarey59
0 siblings, 0 replies; 2+ messages in thread
From: mlcarey59 @ 2001-08-02 16:36 UTC (permalink / raw)
To: gcc-gnats
>Number: 3918
>Category: c
>Synopsis: Access violation when using GCC to compile CGI scripts with fread and fgetc functions
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 02 16:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Marcus Carey
>Release: GCC Version 2.95.3-2
>Organization:
>Environment:
Win 2000 Server
>Description:
Problem accessing GCC compiled programs from IE 5.0 web browser using IIS 5.0 web server.
The program compiles and works using the windows console. But when accesed from a web browser the program causes a STATUS_ACCESS_VIOLATION. This violation occures if the program calls the fread and fgets functions after opening a file.
Also the programs compiles and works using the MS VC++ 6.00 compiler.
>How-To-Repeat:
Create a c program that opens a file. Place the program in a cgi-bin and call it from a web browser.
void main()
{
FILE *filename;
char *filebuffer[BUFFER_SIZE];
filename = fopen("file","r");
fgets(filebuffer,sizeof(filebuffer),filename);
printf("%s",filebuffer);
}
>Fix:
Most of the STATUS_ACCESS_VIOLATIONS I have encounter have to deal with memmory. However I could not find a solution to fix this problem.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-02-24 17:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-24 10:06 c/3918: Access violation when using GCC to compile CGI scripts with fread and fgetc functions rodrigc
-- strict thread matches above, loose matches on Subject: below --
2001-08-02 16:36 mlcarey59
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).