Skip to content

Commit

Permalink
fix 'download xilinx xclbin file on aws crash' issue (Xilinx#1749)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhz authored and maxzhen committed Jul 31, 2019
1 parent fbfb324 commit 8654da1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/runtime_src/driver/xclng/xrt/user_aws/shim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ namespace awsbwhal {
axlf *axlfbuffer = reinterpret_cast<axlf*>(const_cast<xclBin*> (buffer));
fpga_mgmt_image_info orig_info;
char* afi_id = get_afi_from_axlf(axlfbuffer);

if (!afi_id)
return -EINVAL;

std::memset(&orig_info, 0, sizeof(struct fpga_mgmt_image_info));
fpga_mgmt_describe_local_image(mBoardNumber, &orig_info, 0);

Expand Down

0 comments on commit 8654da1

Please sign in to comment.