Re: [PATCH v1 0/5] EDK2 Code First: PI Specification: Update EFI_MM_COMMUNICATE_HEADER
Kun Qin
Hi Marvin,
toggle quoted messageShow quoted text
I would prefer not to rely on undefined behaviors from different compilers. Instead of using flexible arrays, is it better to remove the `Data` field, pack the structure and follow "VARIABLE_LOCK_ON_VAR_STATE_POLICY" pattern? In that case, OFFSET_OF will be forced to change to sizeof, and read/write to `Data` will follow the range indicated by MessageLength. But yes, that will enforce developers to update their platform level implementations accordingly. Regards, Kun
On 06/23/2021 08:26, Laszlo Ersek wrote:
On 06/23/21 08:54, Marvin Häuser wrote:On 22.06.21 17:34, Laszlo Ersek wrote:No specific concern; my point was that two aspects of the same "class"On 06/18/21 11:37, Marvin Häuser wrote:Yes, it's UB by the standard, but this is actually how MS implementsOn 16.06.21 22:58, Kun Qin wrote:I too am surprised to seeOn 06/16/2021 00:02, Marvin Häuser wrote:Huh, interesting. Last time I tried I was told about incompatibilities2) Is it feasible yet with the current set of supported compilers toMy impression is that flexible arrays are already supported (as seen
|
|