On Thu, 28 Dec 2023, Andrew Cooper wrote:
> The use of uninitialised data is undefined behaviour. At -O2 with trivial
> examples, both Clang and GCC delete the variable, and in the case of a
> function return, the caller gets whatever was stale in %rax prior to the call.
>
> Clang includes -Wunin
On 2024-01-05 07:56, Jan Beulich wrote:
On 04.01.2024 21:43, Roberto Bagnara wrote:
On 2024-01-04 15:33, Andrew Cooper wrote:
On 04/01/2024 1:41 pm, Jan Beulich wrote:
On 28.12.2023 20:39, Andrew Cooper wrote:
The use of uninitialised data is undefined behaviour. At -O2 with trivial
examples
On 04.01.2024 16:33, Jan Beulich wrote:
> On 04.01.2024 15:33, Andrew Cooper wrote:
>> On 04/01/2024 1:41 pm, Jan Beulich wrote:
>>> Furthermore this initialize-to-self is a well known pattern to suppress the
>>> -Wuninitialized induced warnings, originally used by Linux'es
>>> uninitialized_var().
On 04.01.2024 21:43, Roberto Bagnara wrote:
> On 2024-01-04 15:33, Andrew Cooper wrote:
>> On 04/01/2024 1:41 pm, Jan Beulich wrote:
>>> On 28.12.2023 20:39, Andrew Cooper wrote:
The use of uninitialised data is undefined behaviour. At -O2 with trivial
examples, both Clang and GCC delete
On Thu, 4 Jan 2024, Roberto Bagnara wrote:
> On 2024-01-04 15:33, Andrew Cooper wrote:
> > On 04/01/2024 1:41 pm, Jan Beulich wrote:
> > > On 28.12.2023 20:39, Andrew Cooper wrote:
> > > > The use of uninitialised data is undefined behaviour. At -O2 with
> > > > trivial
> > > > examples, both Clan
> > Getting ~0 back is strictly less bad than getting stack rubble because
> > at least it's obviously wrong.
>
> But then why not change things so there's no issue anymore? Plus I'm not
> sure how / whether "obviously wrong" would manifest. I expect it would
> be an entirely unobvious boot hang, o
On 2024-01-04 15:33, Andrew Cooper wrote:
On 04/01/2024 1:41 pm, Jan Beulich wrote:
On 28.12.2023 20:39, Andrew Cooper wrote:
The use of uninitialised data is undefined behaviour. At -O2 with trivial
examples, both Clang and GCC delete the variable, and in the case of a
function return, the ca
On 04.01.2024 15:33, Andrew Cooper wrote:
> On 04/01/2024 1:41 pm, Jan Beulich wrote:
>> On 28.12.2023 20:39, Andrew Cooper wrote:
>>> The use of uninitialised data is undefined behaviour. At -O2 with trivial
>>> examples, both Clang and GCC delete the variable, and in the case of a
>>> function r
On 04/01/2024 1:41 pm, Jan Beulich wrote:
> On 28.12.2023 20:39, Andrew Cooper wrote:
>> The use of uninitialised data is undefined behaviour. At -O2 with trivial
>> examples, both Clang and GCC delete the variable, and in the case of a
>> function return, the caller gets whatever was stale in %ra
On 28.12.2023 20:39, Andrew Cooper wrote:
> The use of uninitialised data is undefined behaviour. At -O2 with trivial
> examples, both Clang and GCC delete the variable, and in the case of a
> function return, the caller gets whatever was stale in %rax prior to the call.
>
> Clang includes -Wunin
The use of uninitialised data is undefined behaviour. At -O2 with trivial
examples, both Clang and GCC delete the variable, and in the case of a
function return, the caller gets whatever was stale in %rax prior to the call.
Clang includes -Wuninitialized within -Wall, but GCC only includes it in
11 matches
Mail list logo