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? 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 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 #define MAX_NR_VERTICES 10000
genbin.h
10000 or more
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
Post a Comment