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@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:



Requirements

RoutineRequired header
_malloca<malloc.h>

All the best,

Ron Teitelbaum


On Mon, Dec 19, 2022 at 12:00 PM Marcel Taeumel <marcel.taeumel@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