DEFHANDLER PROGN blows the stack on DECLARE NOTINILINE
CLHS NOTINLINE says,
In the presence of a compiler macro definition for
function-name, anotinlinedeclaration prevents that compiler macro from being used.
The macroexpansion machinery contained in this library ignores this fact and recursively compiler-macroexpands a form which was explicitly declared NOTINLINE, which leads into undefined behaviour as demonstrated in https://github.com/Clozure/ccl/issues/270.
So fixing this FN bug should make CEPL usable again?
What does "make CEPL usable again" mean? I have no idea what broke all of CEPL; all I know is that, at the time or writing this bug, this code invoked undefined behavior by expanding compiler macros where they explicitly should not be expanded.
If I understand correctly, then fixing this on FN side will prevent the stack overflows mentioned in linked tickets.
By "make CEPL usable again" I mean this stack overflow prevents CEPL from loading and I'm not aware of any other show-stopping CEPL bugs.
I'll whale on FN now.
No need to whale on it; just figure out a way to not call compiler-macroexpand-1 on a form if the car of this form has been declared notinline in the lexical environment.
Sounds good to me. Meanwhile, I found a workaround at https://github.com/cbaggers/cepl/issues/350#issuecomment-693713107
There seems to be the function cltl2: function-information that can check if a function is declared inline. Not sure if it available everywhere, as it looks like a language extension. See https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node102.html.
IMO this function is available everywhere enough - see https://github.com/Zulu-Inuoe/trivial-cltl2/ on http://portability.cl/