Re: RFR: JDK-8300080: offset_of for GCC/Clang exhibits undefined behavior and is not always a compile-time constant

2023-01-13 Thread Kim Barrett
On Thu, 12 Jan 2023 20:36:31 GMT, Justin King wrote: >> The implementation of `offset_of` for GCC/Clang only deals with types are >> aligned to 16 bytes or less, if they are more, such as `zCollectedHeap` the >> behavior is undefined. UBSan also suggests that `offset_of` is not always a >> com

Re: RFR: JDK-8300080: offset_of for GCC/Clang exhibits undefined behavior and is not always a compile-time constant

2023-01-13 Thread Kim Barrett
On Thu, 12 Jan 2023 20:28:50 GMT, Justin King wrote: > The implementation of `offset_of` for GCC/Clang only deals with types are > aligned to 16 bytes or less, if they are more, such as `zCollectedHeap` the > behavior is undefined. UBSan also suggests that `offset_of` is not always a > compile

Re: RFR: JDK-8300080: offset_of for GCC/Clang exhibits undefined behavior and is not always a compile-time constant

2023-01-13 Thread Kim Barrett
On Thu, 12 Jan 2023 20:28:50 GMT, Justin King wrote: > The implementation of `offset_of` for GCC/Clang only deals with types are > aligned to 16 bytes or less, if they are more, such as `zCollectedHeap` the > behavior is undefined. UBSan also suggests that `offset_of` is not always a > compile

Re: RFR: JDK-8300080: offset_of for GCC/Clang exhibits undefined behavior and is not always a compile-time constant

2023-01-12 Thread Aleksey Shipilev
On Thu, 12 Jan 2023 20:28:50 GMT, Justin King wrote: > The implementation of `offset_of` for GCC/Clang only deals with types are > aligned to 16 bytes or less, if they are more, such as `zCollectedHeap` the > behavior is undefined. UBSan also suggests that `offset_of` is not always a > compile

Re: RFR: JDK-8300080: offset_of for GCC/Clang exhibits undefined behavior and is not always a compile-time constant

2023-01-12 Thread Justin King
On Thu, 12 Jan 2023 20:28:50 GMT, Justin King wrote: > The implementation of `offset_of` for GCC/Clang only deals with types are > aligned to 16 bytes or less, if they are more, such as `zCollectedHeap` the > behavior is undefined. UBSan also suggests that `offset_of` is not always a > compile

RFR: JDK-8300080: offset_of for GCC/Clang exhibits undefined behavior and is not always a compile-time constant

2023-01-12 Thread Justin King
The implementation of `offset_of` for GCC/Clang only deals with types are aligned to 16 bytes or less, if they are more, such as `zCollectedHeap` the behavior is undefined. UBSan also suggests that `offset_of` is not always a compile time constant, as the stack trace came from the dynamic loader