From: Stefano Sabatini <stefasab@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 4/6] doc/developer: add a code behaviour section to development policy Date: Thu, 31 Aug 2023 17:28:48 +0200 Message-ID: <ZPCxsJ4KtVnZSE8z@mariano> (raw) In-Reply-To: <169329808575.20400.4593289958410673620@lain.khirnov.net> On date Tuesday 2023-08-29 10:34:45 +0200, Anton Khirnov wrote: > Quoting Stefano Sabatini (2023-08-27 14:38:44) > > Il sab 26 ago 2023, 20:08 Anton Khirnov <anton@khirnov.net> ha scritto: > > > > > Document our longstanding de facto policies on things like correctness, > > > thread-safety, UB, etc. > > > > > > > UB? > > undefined behavior yes, let's avoid acronyms > > > > > --- > > > doc/developer.texi | 50 +++++++++++++++++++++++++++++++++------------- > > > 1 file changed, 36 insertions(+), 14 deletions(-) > > > > > > diff --git a/doc/developer.texi b/doc/developer.texi > > > index df43119f98..afa0148137 100644 > > > --- a/doc/developer.texi > > > +++ b/doc/developer.texi > > > @@ -274,10 +274,6 @@ symbols. If in doubt, just avoid names starting with > > > @code{_} altogether. > > > @section Miscellaneous conventions > > > > > > @itemize @bullet > > > -@item > > > -fprintf and printf are forbidden in libavformat and libavcodec, > > > -please use av_log() instead. > > > - > > > @item > > > Casts should be used only when necessary. Unneeded parentheses > > > should also be avoided if they don't make the code easier to understand. > > > @@ -286,6 +282,42 @@ should also be avoided if they don't make the code > > > easier to understand. > > > @anchor{Development Policy} > > > @chapter Development Policy > > > > > > +@section Code behaviour > > > + > > > +@subheading Correctness > > > +The code must be valid. It must not crash, abort, access invalid > > > pointers, leak > > > +memory, cause data races or signed integer overflow, or otherwise invoke > > > +undefined behaviour. > > > > > > Invoke => assume? > > No, 'assume' would mean something else. 'cause' maybe. "cause" sounds good. > > > > > Error codes should be checked and, when applicable, > > > +forwarded to the caller. > > > + > > > +@subheading Thread- and library-safety > > > +Our libraries may be called by multiple independent callers in the same > > > process. > > > +These calls may happen from any number of threads and the different call > > > sites > > > +may not be aware of each other - e.g. a user program may be calling us > > > directly, > > > > > > > Calling us -> calling the/our libraries > > I wanted to avoid using the word 'libraries' multiple times, to avoid > possible confusion of which library is being talked about - whether ours > or some external one. But using "us" is even more confusing (who/what is "us"?), I have no better ideas than repeating "our/the FFmpeg libraries". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2023-08-31 15:29 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-26 18:07 [FFmpeg-devel] [PATCH 1/6] doc/developer: move a sentence to a more appropriate place Anton Khirnov 2023-08-26 18:07 ` [FFmpeg-devel] [PATCH 2/6] doc/developer: merge the 'contributing code' section into its parent chapter Anton Khirnov 2023-08-27 12:19 ` Stefano Sabatini 2023-08-26 18:07 ` [FFmpeg-devel] [PATCH 3/6] doc/developer: fix a nonsense statement Anton Khirnov 2023-08-27 12:21 ` Stefano Sabatini 2023-08-26 18:07 ` [FFmpeg-devel] [PATCH 4/6] doc/developer: add a code behaviour section to development policy Anton Khirnov 2023-08-26 18:36 ` Andreas Rheinhardt 2023-08-26 18:54 ` Anton Khirnov 2023-08-27 12:38 ` Stefano Sabatini 2023-08-29 8:34 ` Anton Khirnov 2023-08-31 15:28 ` Stefano Sabatini [this message] 2023-09-01 17:01 ` Michael Niedermayer 2023-09-01 17:10 ` Rémi Denis-Courmont 2023-09-01 17:26 ` Paul B Mahol 2023-09-01 18:33 ` Stefano Sabatini 2023-09-02 20:03 ` Michael Niedermayer 2023-09-03 8:29 ` Rémi Denis-Courmont 2023-09-03 16:21 ` Michael Niedermayer 2023-08-26 18:07 ` [FFmpeg-devel] [PATCH 5/6] doc/developer: drop an outdated item Anton Khirnov 2023-08-27 12:40 ` Stefano Sabatini 2023-08-26 18:07 ` [FFmpeg-devel] [PATCH 6/6] doc/developer: deduplicate commit message rules Anton Khirnov 2023-08-27 12:46 ` Stefano Sabatini 2023-08-27 12:18 ` [FFmpeg-devel] [PATCH 1/6] doc/developer: move a sentence to a more appropriate place Stefano Sabatini
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=ZPCxsJ4KtVnZSE8z@mariano \ --to=stefasab@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git