Spurious use of SQLITE_USE_ALLOCA?

From: George Mitchell <george+freebsd_at_m5p.com>
Date: Sun, 02 Jun 2024 18:53:40 UTC
(Tried sending to chromium@, but I'm not a subscriber.)

I'm currently getting compile failures of chromium 125.0.6422.112 on
FreeBSD 13.2-RELEASE-p10:

In file included from ../../third_party/sqlite/sqlite3_shim.c:16:
../../third_party/sqlite/src/amalgamation/sqlite3.c:53619:21: error: 
call to undeclared function 'alloca'; ISO C99 and later do not support 
implicit function declarations [-Wimplicit-function-declaration]
  53619 |     u32 *aiValues = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));
        |                     ^
../../third_party/sqlite/src/amalgamation/sqlite3.c:20536:38: note: 
expanded from macro 'sqlite3StackAllocRaw'
  20536 | # define sqlite3StackAllocRaw(D,N)   alloca(N)
        |                                      ^
../../third_party/sqlite/src/amalgamation/sqlite3.c:53619:10: error: 
incompatible integer to pointer conversion initializing 'u32 *' (aka 
'unsigned int *') with an expression of type 'int' [-Wint-conversion]
  53619 |     u32 *aiValues = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));
        |          ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/sqlite/src/amalgamation/sqlite3.c:78371:14: error: 
call to undeclared function 'alloca'; ISO C99 and later do not support 
implicit function declarations [-Wimplicit-function-declaration]
  78371 |   b.apCell = sqlite3StackAllocRaw(0, szScratch );
        |              ^
../../third_party/sqlite/src/amalgamation/sqlite3.c:20536:38: note: 
expanded from macro 'sqlite3StackAllocRaw'
  20536 | # define sqlite3StackAllocRaw(D,N)   alloca(N)
        |                                      ^
../../third_party/sqlite/src/amalgamation/sqlite3.c:78371:12: error: 
incompatible integer to pointer conversion assigning to 'u8 **' (aka 
'unsigned char **') from 'int' [-Wint-conversion]
  78371 |   b.apCell = sqlite3StackAllocRaw(0, szScratch );
        |            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/sqlite/src/amalgamation/sqlite3.c:166054:12: error: 
call to undeclared function 'alloca'; ISO C99 and later do not support 
implicit function declarations [-Wimplicit-function-declaration]
  166054 |   pSpace = sqlite3StackAllocRawNN(pParse->db, nSpace);
         |            ^
../../third_party/sqlite/src/amalgamation/sqlite3.c:20537:38: note: 
expanded from macro 'sqlite3StackAllocRawNN'
  20537 | # define sqlite3StackAllocRawNN(D,N) alloca(N)
        |                                      ^
../../third_party/sqlite/src/amalgamation/sqlite3.c:166054:10: error: 
incompatible integer to pointer conversion assigning to 'char *' from 
'int' [-Wint-conversion]
  166054 |   pSpace = sqlite3StackAllocRawNN(pParse->db, nSpace);
         |          ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 errors generated.

The 'alloca' comes from the expansion of sqlite3StackAllocRaw, due to
SQLITE_USE_ALLOCA being defined (seems implausible), due to the compile
command line including '-DSQLITE_USE_ALLOCA'.  I haven't been able to
figure out why '-DSQLITE_USE_ALLOCA' appears on the command line.  A
full typescript is at m5p.com/public/george/typescript.  Suggestions
for proceeding gratefully accepted!                      -- George