diff options
| author | Mahmoud <[email protected]> | 2019-09-12 18:33:13 -0400 |
|---|---|---|
| committer | Mahmoud <[email protected]> | 2019-09-12 18:33:13 -0400 |
| commit | 688044e9f7a9aef0a63a9610b496baafd886c556 (patch) | |
| tree | 3abff089e87ed1ee72fa3227321af10b046bdf16 /src/cuda-sim/ptx_loader.cc | |
| parent | 7d1a848b4807aa1f8ed2bb0478f0a53bf09dcee7 (diff) | |
| parent | bea40c4a22a86fddbf1f7845265697716727f8b1 (diff) | |
Merge branch 'dev' of https://github.com/purdue-aalp/gpgpu-sim_distribution into dev-private
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 dca3cec..33bcf45 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"); |
