diff options
| author | Mahmoud <[email protected]> | 2019-09-12 18:30:18 -0400 |
|---|---|---|
| committer | Mahmoud <[email protected]> | 2019-09-12 18:30:18 -0400 |
| commit | 5753f2236b73be3e2a1a49a55fc5c52310eba622 (patch) | |
| tree | c30d62bb70f62a7930f4fa0763c219b103b622d3 /src/cuda-sim/ptx_loader.cc | |
| parent | 6ce5e06d2389cad5041b495d5516b503ec7d2cd2 (diff) | |
| parent | bea40c4a22a86fddbf1f7845265697716727f8b1 (diff) | |
Merge branch 'dev' of https://github.com/purdue-aalp/gpgpu-sim_distribution into dev-traces
Diffstat (limited to 'src/cuda-sim/ptx_loader.cc')
| -rw-r--r-- | src/cuda-sim/ptx_loader.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cuda-sim/ptx_loader.cc b/src/cuda-sim/ptx_loader.cc index 207fa1f..f06fefd 100644 --- a/src/cuda-sim/ptx_loader.cc +++ b/src/cuda-sim/ptx_loader.cc @@ -214,7 +214,8 @@ void fix_duplicate_errors(char fname2[1024]) { long filesize = ftell(ptxsource); rewind(ptxsource); char *ptxdata = (char*)malloc((filesize+1)*sizeof(char)); - fread(ptxdata, filesize, 1, ptxsource); + // Fail if we do not read the file + assert(fread(ptxdata, filesize, 1, ptxsource) == 1); fclose(ptxsource); FILE *ptxdest = fopen(fname2,"w"); |
