Date: Mon, 20 Feb 2023 20:42:59 -0500
On 2/19/23 00:05, Jason McKesson via Std-Proposals wrote:
>>
>> Alright I forgot my laptop is dual-boot with Windows 8.1. So I compiled
>> the application attached using clang++ version 8.0 under Windows and
>> clang++ version 10.0 under Linux on the *same* laptop of 16 GB of memory.
>>
>> On Windows, it crashes before printing anything.
>>
>> On Linux, it works perfectly fine and outputs:
>>
>> int main(): allocating maximum: 65536 kilobytes.
>> void test(int): 1
>> void test(int): 2
>> void test(int): 4
>> void test(int): 8
>> void test(int): 16
>> void test(int): 32
>> void test(int): 64
>> void test(int): 128
>> int main(): done.
>>
>> So case closed, I proved my point. The only hope left is to amend the C++ standards.
>
> To amend it to do... what? Fix your *stack overflow*? Because that's
> what the Visual Studio debugger told me happened when you stuck a 2MB
> array on the stack.
>
> Once I took out your massive stack allocation... it ran fine.
Alright... go ahead and try the one attached and you'll see by yourself
it crashes right away.
Although it's not happening with smaller buffers, I suspect Windows uses
different heaps based on their size but the large page heaps are
definitely faulty.
Case closed and sealed.
Next.
>>
>> Alright I forgot my laptop is dual-boot with Windows 8.1. So I compiled
>> the application attached using clang++ version 8.0 under Windows and
>> clang++ version 10.0 under Linux on the *same* laptop of 16 GB of memory.
>>
>> On Windows, it crashes before printing anything.
>>
>> On Linux, it works perfectly fine and outputs:
>>
>> int main(): allocating maximum: 65536 kilobytes.
>> void test(int): 1
>> void test(int): 2
>> void test(int): 4
>> void test(int): 8
>> void test(int): 16
>> void test(int): 32
>> void test(int): 64
>> void test(int): 128
>> int main(): done.
>>
>> So case closed, I proved my point. The only hope left is to amend the C++ standards.
>
> To amend it to do... what? Fix your *stack overflow*? Because that's
> what the Visual Studio debugger told me happened when you stuck a 2MB
> array on the stack.
>
> Once I took out your massive stack allocation... it ran fine.
Alright... go ahead and try the one attached and you'll see by yourself
it crashes right away.
Although it's not happening with smaller buffers, I suspect Windows uses
different heaps based on their size but the large page heaps are
definitely faulty.
Case closed and sealed.
Next.
-- Logo <https://www.fornux.com/> *Phil Bouchard* facebook icon <https://www.linkedin.com/in/phil-bouchard-5723a910/> CTO T: (819) 328-4743 E: phil_at_[hidden]| www.fornux.com <http://www.fornux.com> 8 rue de la Baie| Gatineau (Qc), J8T 3H3 Canada Banner <https://goglobalawards.org/> Le message ci-dessus, ainsi que les documents l'accompagnant, sont destinés uniquement aux personnes identifiées et peuvent contenir des informations privilégiées, confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce message par erreur, veuillez le détruire. This communication (and/or the attachments) is intended for named recipients only and may contain privileged or confidential information which is not to be disclosed. If you received this communication by mistake please destroy all copies.
Received on 2023-02-21 01:43:01