From: grischka <[email protected]>
To: <[email protected]>, "Mounir IDRASSI via
Tinycc-devel"<[email protected]>, "tinycc-devel"<[email protected]>
Cc: "Mounir IDRASSI"<[email protected]>
Date: Fri, 15 May 2026 09:53:26 +0900
Subject: Re: [Tinycc-devel] win32: use VirtualAlloc for tccrun memory
>Hi,
>
>I don't think that this can happen. You can use "tcc -vv -run ..." to see
>allocation and permission details.
>
>Also, if it were a problem then why would it be only on windows?
>
>Maybe it's a bug in bitdefender?
>
Hi,
Thanks. I agree that the old code page aligns the run memory, so Bitdefender
may indeed be flagging suspicious behavior rather than an actual failure.
That being said, on Windows the old path still changes page protection on CRT
heap memory.
Microsoft VirtualProtect documentation recommends avoiding this for
heap-allocated blocks, and documents VirtualAlloc + VirtualProtect as the
normal pattern for generated code.
So using VirtualAlloc avoids that pattern and is more in line with the Windows
API guidance.
Regards,
Mounir IDRASSI
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel