user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH] HACKING: add a note about avoiding recursion
@ 2019-10-24 21:09  7% Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2019-10-24 21:09 UTC (permalink / raw)
  To: meta

Bad things happen when user data can control our stack size.
---
  Maybe there's programming languages where deep recursion isn't
  a problem, but they're not widely available on common GNU/Linux
  or *BSD systems.

 HACKING | 5 +++++
 1 file changed, 5 insertions(+)

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

^ permalink raw reply related	[relevance 7%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-10-24 21:09  7% [PATCH] HACKING: add a note about avoiding recursion Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).