yxsamliu wrote:

[AMD Official Use Only - General]

Thanks. I will fix it by memcpy instead of dereferencing int* casted from char*.

Sam

From: Joseph Huber ***@***.***>
Sent: Thursday, October 5, 2023 9:23 AM
To: llvm/llvm-project ***@***.***>
Cc: Liu, Yaxun (Sam) ***@***.***>; State change ***@***.***>
Subject: Re: [llvm/llvm-project] [HIP] Support compressing device binary (PR 
#67162)

Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.


For reference, I've had similar problems in the past. Usually it happens 
because the header needs to be aligned on a uint64_t to be read. The ELF 
section has 8-byte alignment, but that can be incorrect when extracting from 
something like an archive. I just make a copy in that case 
https://github.com/llvm/llvm-project/blob/main/llvm/lib/Object/OffloadBinary.cpp#L156.

—
Reply to this email directly, view it on 
GitHub<https://github.com/llvm/llvm-project/pull/67162#issuecomment-1748889672>,
 or 
unsubscribe<https://github.com/notifications/unsubscribe-auth/ABO4LZ3TH2F7AQWO2CQH7ZTX52YBPAVCNFSM6AAAAAA5DLFYLGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBYHA4DSNRXGI>.
You are receiving this because you modified the open/close state.Message ID: 
***@***.******@***.***>>


https://github.com/llvm/llvm-project/pull/67162
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to