[Vm-dev] Building OSVM in Windows 11 and Cygwin64 ...

Jakob Reschke jakres+squeak at gmail.com
Fri Dec 30 23:43:03 UTC 2022


cygLLVMSupport-8.dll imports _alloca from cygwin1.dll. Discovered using the
dependency tool from https://github.com/lucasg/Dependencies

So Marcel, is this clang-8.exe run in a Cygwin environment where
cygwin1.dll is in the search path?

The rest of the text is more about _alloca and why it might not be in the
Windows standard libraries, but may not necessarily help solve the problem.

_alloca being deprecated does not mean that it is expected that it gets
removed:
https://learn.microsoft.com/en-us/cpp/c-runtime-library/security-features-in-the-crt?view=msvc-170#:~:text=In%20this%20context%2C%20%22deprecated%22%20means%20that%20use%20of%20the%20function%20isn%27t%20recommended.%20It%20doesn%27t%20mean%20the%20function%20will%20be%20removed%20from%20the%20CRT
.

I would have expected the function in ucrtbase.dll based on
https://learn.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-170
But it is not there, and neither is _malloca.

Might be a compiler built-in function, that would explain why it is not in
a shared library.
https://mingw-users.narkive.com/W6kWKbzP/alloca-function-does-not-exist
As we can see now, Cygwin decided to ship a proper function in their DLL
instead.



Am Mo., 19. Dez. 2022 um 18:29 Uhr schrieb Ron Teitelbaum <ron at usmedrec.com
>:

>
> Just saw this:
>
> https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/alloca?view=msvc-170
>
> _alloca
>
> Article
> 10/26/2022
>
> Allocates memory on the stack. This function is *deprecated* because a
> more secure version is available; see:
>
>  _malloca
> <https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/malloca?view=msvc-170>
> .
>
>
> https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/malloca?view=msvc-170
>
> Requirements
>
> RoutineRequired header
> _malloca<malloc.h>
>
> All the best,
>
> Ron Teitelbaum
>
>
> On Mon, Dec 19, 2022 at 12:00 PM Marcel Taeumel <marcel.taeumel at hpi.de>
> wrote:
>
>>
>> Hi all!
>>
>> Has anybody tried to build OSVM in Windows 11 via Cygwin64?
>>
>> clang-8 does not work because "_alloca" cannot be found ... hmm...
>>
>>
>> So, who implements _alloca? It's not msvcrt.dll ... how to find that out?
>>
>> Best,
>> Marcel
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20221231/b272fcef/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 31608 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20221231/b272fcef/attachment-0001.png>


More information about the Vm-dev mailing list