Skip to main content
1 vote
Accepted

Pset6 Indexes Server.c - Segmentation Fault

There are problems in this index function. However, they are not causing all the check50 failures. Those problems probably stem from load function. Since check50 (probably) makes a direct request to ...
DinoCoderSaurus's user avatar
1 vote
Accepted

Pset6: Errors with Check50

Your question is too extensive, I am not a person who likes to reprimand anyone, but the work of debugging the program has to leave you, the time required to check and respond to all errors is very ...
MARS's user avatar
  • 5,179
1 vote
Accepted

indexes function in server.c

You'll upload server.c to the staff's computer and the file will be tested there in their directories, not in your directories. And they decided that the files will be called index. If this answers ...
Yuri Laguardia's user avatar
1 vote
Accepted

Need help with load function pset6

load buffer is allocated for one byte here BYTE* buffer = malloc(sizeof(BYTE)); This while(fread(buffer, 512, 1, file) == 1) reads 512 bytes into buffer. And buffer is only and ever allocated for ...
DinoCoderSaurus's user avatar
1 vote
Accepted

Pset6: load() and indexes() fail check50 server2 (but parse() and lookup() pass check50 server1)

[answer removed to respect the Honor Code]
DinoCoderSaurus's user avatar
1 vote
Accepted

pset6 server2 /dir/ malloc [SOLVED]

Your function now has index.php written two times. One here: strcat(php, "index.php"); Another here: strcat(html, "index.php");
Yuri Laguardia's user avatar
1 vote
Accepted

How/when to free this memory? (pset6/server)

Does valgrind return the leak if it finds index.html or index.php? I would predict this indexes would leak memory only if neither of those files is "found". Generally speaking, one would not change ...
DinoCoderSaurus's user avatar
1 vote
Accepted

check50 fails on pset6 possibly indexes function

The old sizeof trap. strlen(path) + strlen(php) + 1 returns an integer. sizeof an integer is 4. In two places. Do not use sizeof. Here is a good explanation. Think about this, if you allocate dir for ...
DinoCoderSaurus's user avatar
1 vote

Pset6: How to debug load() and indexes()?

Here's what I do. Use debug50 instead of the command line gdb. If you haven't used that before: Run update50 to be sure you are up to date (the IDE is on version 81 at the moment). Then, here's ...
curiouskiwi's user avatar
  • 18.7k

Only top scored, non community-wiki answers of a minimum length are eligible