[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <80753cbc54ef69b4fc136f791666197fc8b1f8bb.camel@cyberfiber.eu>
Date: Mon, 22 Feb 2021 10:08:50 +0100
From: "Michael J. Baars" <mjbaars1977.gcc@...erfiber.eu>
To: gcc@....gnu.org, linux-kernel@...r.kernel.org
Subject: problems with memory allocation and the alignment check
Hi,
I just wrote this little program to demonstrate a possible flaw in both malloc and calloc.
If I allocate a the simplest memory region from main(), one out of three optimization flags fail.
If I allocate the same region from a function, three out of three optimization flags fail.
Does someone know if this really is a flaw, and if so, is it a gcc or a kernel flaw?
Regards,
Mischa.
View attachment "main.c" of type "text/x-csrc" (862 bytes)
View attachment "makefile" of type "text/x-makefile" (102 bytes)
Powered by blists - more mailing lists