From e0c7955ead5251f969c742e3aab8d912f7d510f3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 24 Oct 2019 21:09:42 +0000 Subject: HACKING: add a note about avoiding recursion Bad things happen when user data can control our stack size. --- HACKING | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'HACKING') diff --git a/HACKING b/HACKING index 666d504e..859745ef 100644 --- a/HACKING +++ b/HACKING @@ -43,6 +43,11 @@ distribute and verify. public-inbox itself will only be implemented in scripting languages (currently Perl 5) and optional JIT-compiled C (via Inline::C) +Do not recurse on user-supplied data. Neither Perl or C handle +deep recursion gracefully. See lib/PublicInbox/SearchThread.pm +and lib/PublicInbox/MsgIter.pm for examples of non-recursive +alternatives to previously-recursive algorithms. + Performance should be reasonably good for server administrators, too, and we will sacrifice features to achieve predictable performance. Encouraging folks to self-host will be easier with lower hardware -- cgit v1.2.3-24-ge0c7