c - "Segmentation fault" with large files -


I am trying to replace a graph using ASCII DIMACS format using this tool ??? . Unfortunately, this does not work with large files (& gt; 2GB); Output is "segmentation fault (core dump)". How can I fix this problem? #define MAX_NR_VERTICES 10000 genbin.h

In

In addition, it does not check any errors whether it is read in the corner from the file or is more than this size, it just writes invalid memory if the file contains the serial number 10000 or more

Perhaps your "big file" can contain more than 10,000 characters?

This code generally has very little error-checking, there are many things you can do in your input file which will cause this code to write an invalid memory without any warning May be.

If you want to modify this code to work with more than 10,000 characters, then I recommend that bitmap once you nr_vert read and validated, and added error-checking in every read operation. (And fix line 77, in which an incorrect attempt has been made to check the error).

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -