i know there is this stack cookie thing, but is it really needed?
i seems kinda outdated, at least how i understand it
one gives the stack cookie the program can use *if* the environment provides not enough stack size, i.e. WB or shell
but its still limited to the size i give in the cookie? unless i change the stack size in its icon or in the shell?
why?
why not simply enhance the stack where needed? the OS should be capable of providing on-the-fly stack enhancement, shouldnt it?
or is the stack a "closed" memory area reserved just for the app that demands/needs it?
and is the stack memory locked for the app while it runs?
what if i gave a 2 GB stack cookie to a single app...would the system freeze? or would no other programs be able to register any more memory (which would in turn lead to a crash or freeze the system sooner or later, i think...?) heh
or would the memory only be used if it really would be needed and otherwise be free to any other app? if that is true, then why not simply set the stack size for every program to the available amount of memory system-wide?
why not simply enhance the stack where needed? the OS should be capable of providing on-the-fly stack enhancement, shouldnt it?
The C compiler (at least GCC, not sure about VBCC) has an option to increase the stack size automatically when required, but AmigaOS 4.x doesn't support that and will crash if the stack size is too small. The "stack cookie" is only one of the options, there is the shell stack size or the Workbench Icon stack size as well, and the largest one of all options will be used, but if all of them are too small for a given program it will crash on AmigaOS 4.x. The stack can't be swapped out by the pager, if you'd use 2 GB stack any program will crash immediately because of the 2 GB limit of a single, ancient Exec(SG) function. Using 1 GB may work for most software, but you'll only have the other 1 GB available for anything else.
@LiveForIt AmigaOS doesn't have any problems with fragmented stacks, even porting Rust to AmigaOS, the programming language used for example by the current FireFox versions, would be much less of a problem than for example porting the Linux version was to BSD Unixes. AmigaOS always supporting stack swapping, for example the ancient IExec->StackSwap() and newer replacement functions in Exec(SG).
to conclude that, it wasn't the stack, but a problem in-code resp. a missing feature https://github.com/sba1/adtools/issues/159 (wrong tracker, i know, please point to the correct tracker, thank you)
I'm too dumb to give up, so i'm testing my *skills* (lol) on another porting project, but i hit a wall (as guessed) with a pretty standard header file.
disclaimer: i'm on cross-compiler since cmake is mandatory for the project and native cmake is hopelessly outdated and broken...so...
The file in question has
#include <cmath>
in it's header flock, but produces errors on compiling
there is also another file called "Math.cpp" within the source files...could that be interfering?
I read here, that it could be the cause, but i don't understand why
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath: At global scope:
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1071:11: error: 'acoshl' has not been declared in '::'
1071 | using ::acoshl;
| ^~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1075:11: error: 'asinhl' has not been declared in '::'
1075 | using ::asinhl;
| ^~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1079:11: error: 'atanhl' has not been declared in '::'
1079 | using ::atanhl;
| ^~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1083:11: error: 'cbrtl' has not been declared in '::'
1083 | using ::cbrtl;
| ^~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1087:11: error: 'copysignl' has not been declared in '::'
1087 | using ::copysignl;
| ^~~~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1091:11: error: 'erfl' has not been declared in '::'
1091 | using ::erfl;
| ^~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1095:11: error: 'erfcl' has not been declared in '::'
1095 | using ::erfcl;
| ^~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1099:11: error: 'exp2l' has not been declared in '::'
1099 | using ::exp2l;
| ^~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1103:11: error: 'expm1l' has not been declared in '::'
1103 | using ::expm1l;
| ^~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1107:11: error: 'fdiml' has not been declared in '::'
1107 | using ::fdiml;
| ^~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1111:11: error: 'fmal' has not been declared in '::'
1111 | using ::fmal;
| ^~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1115:11: error: 'fmaxl' has not been declared in '::'
1115 | using ::fmaxl;
| ^~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1119:11: error: 'fminl' has not been declared in '::'
1119 | using ::fminl;
| ^~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1127:11: error: 'ilogbl' has not been declared in '::'
1127 | using ::ilogbl;
| ^~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1131:11: error: 'lgammal' has not been declared in '::'
1131 | using ::lgammal;
| ^~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1136:11: error: 'llrintl' has not been declared in '::'
1136 | using ::llrintl;
| ^~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1140:11: error: 'llroundl' has not been declared in '::'
1140 | using ::llroundl;
| ^~~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1145:11: error: 'log1pl' has not been declared in '::'
1145 | using ::log1pl;
| ^~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1149:11: error: 'log2l' has not been declared in '::'
1149 | using ::log2l;
| ^~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1153:11: error: 'logbl' has not been declared in '::'
1153 | using ::logbl;
| ^~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1157:11: error: 'lrintl' has not been declared in '::'
1157 | using ::lrintl;
| ^~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1161:11: error: 'lroundl' has not been declared in '::'
1161 | using ::lroundl;
| ^~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1165:11: error: 'nanl' has not been declared in '::'
1165 | using ::nanl;
| ^~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1169:11: error: 'nearbyintl' has not been declared in '::'
1169 | using ::nearbyintl;
| ^~~~~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1173:11: error: 'nextafterl' has not been declared in '::'
1173 | using ::nextafterl;
| ^~~~~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1175:11: error: 'nexttoward' has not been declared in '::'
1175 | using ::nexttoward;
| ^~~~~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1176:11: error: 'nexttowardf' has not been declared in '::'
1176 | using ::nexttowardf;
| ^~~~~~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1177:11: error: 'nexttowardl' has not been declared in '::'
1177 | using ::nexttowardl;
| ^~~~~~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1181:11: error: 'remainderl' has not been declared in '::'
1181 | using ::remainderl;
| ^~~~~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1185:11: error: 'remquol' has not been declared in '::'
1185 | using ::remquol;
| ^~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1189:11: error: 'rintl' has not been declared in '::'
1189 | using ::rintl;
| ^~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1193:11: error: 'roundl' has not been declared in '::'
1193 | using ::roundl;
| ^~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1197:11: error: 'scalblnl' has not been declared in '::'
1197 | using ::scalblnl;
| ^~~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1201:11: error: 'scalbnl' has not been declared in '::'
1201 | using ::scalbnl;
| ^~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1205:11: error: 'tgammal' has not been declared in '::'
1205 | using ::tgammal;
| ^~~~~~~
/usr/local/amiga/ppc-amigaos/include/c++/11.3.0/cmath:1209:11: error: 'truncl' has not been declared in '::'
1209 | using ::truncl;
| ^~~~~~