Bug 2336442 - bigloo failed to build with GCC 15 ("ERROR:configure:the execution stack is too small.")
Summary: bigloo failed to build with GCC 15 ("ERROR:configure:the execution stack is t...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: bigloo
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: gcc-15-mass-prebuild
TreeView+ depends on / blocked
 
Reported: 2025-01-08 19:01 UTC by Dave Malcolm
Modified: 2025-02-12 22:35 UTC (History)
3 users (show)

Fixed In Version: bigloo-4.5b-6.fc42
Clone Of:
Environment:
Last Closed: 2025-02-12 22:35:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2025-01-08 19:01:59 UTC
I'm experimentally rebuilding rawhide with the not-yet-released GCC 15 to see if anything breaks, and to help write the porting guide.  See https://fedoraproject.org/wiki/User:Dmalcolm/gcc-15

My test build with GCC 15 failed:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed/build/8476124/

whereas my test build with GCC 14 succeeded:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed.checker/build/8477801/

Looking at the failure logs e.g.
https://download.copr.fedorainfracloud.org/results/dmalcolm/gcc-15-smoketest-3.failed/fedora-rawhide-x86_64/08476124-bigloo/builder-live.log.gz
I see:

+ Installing custom GC (gc-8.2.4) source code.
executing ./autoconf/config.guess -> --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu
+ configuring custom GC (gc-8.2.4)...
Configuring custom multi-threaded GC...
configure: WARNING: "Explicit GC_INIT() calls may be required."
executing ./autoconf/gcversion -> 824
executing ./autoconf/bgl-pkg-config -> -lgmp
executing ./autoconf/gmp -> 6.3.0
executing ./autoconf/stacksize -> 1
*** ERROR:configure:the execution stack is too small.

Bigloo REQUIRES a larger stack (it needs a stack of about 2 MB to compile).
In general, it is possible to adjust the stack size by the means of
a shell command.
On most Unix systems, it is frequently called "ulimit" or "unlimit".
For instance, with Bash you should try "ulimit -s 4096".
With Zsh, try "unlimit".

Another solution, if you know what you are doing,
is to use the configure option "--stack-check=no". This will
simply, disable stack size checking.



I'm not yet sure if I messed up my testing, or if this indicates a real compat problem; am investigating...

Reproducible: Always

Comment 1 Jakub Jelinek 2025-01-09 15:46:58 UTC
bigloo-4.5b/autoconf/stacksize
has
int (*fun)();
int glob;

int foo( int x, int y ) {
  return x * y;
}
      
int bar( int x, int y ) {
  return x + y;
}

int ssize( int size ) {
   glob++;
   
   if( size == 0 )
      return 0;
   else
      return fun( size, ssize( size - 1 ) );
}

int main( int argc, char *argv[] ) {
   fun = argc > 2 ? &bar : &foo;

   if( ssize( $stacksize * 1024 * 32 ) >= 0 )
      return 0;
   else
      return argc-1;
}
in it.  This used to be valid in C17, but is not valid in C23, where int (*fun)(); doesn't mean function pointer with unspecified parameters, but it means the same thing as int (*fun)(void); (like in C++).
I think
--- bigloo-4.5b/autoconf/stacksize	2023-12-22 17:18:46.000000000 +0100
+++ bigloo-4.5b/autoconf/stacksize	2025-01-09 16:46:01.346136400 +0100
@@ -58,7 +58,7 @@ rm -f $aout.exe 2> /dev/null
 #*    Test                                                             */
 #*---------------------------------------------------------------------*/
 cat > $file.c <<EOF
-int (*fun)();
+int (*fun)( int, int );
 int glob;
 
 int foo( int x, int y ) {
should fix this, but haven't tried it...

Comment 2 Jerry James 2025-01-13 18:36:16 UTC
Indeed, that works.  Thank you, Jakub!  A similar fix is also needed for autoconf/dlopen.  And then there are more instances of empty parameter lists in the code itself.  I think I'm going to have to build bigloo in C17 mode for now until I have time to fix up the sources.

Comment 3 Jerry James 2025-02-12 22:35:09 UTC
Closing, since bigloo did build successfully during the F42 mass rebuild.  I will talk to upstream about updating the sources for C23.


Note You need to log in before you can comment on or make changes to this bug.