From: "Herman, Géza" <geza.herman@gmail.com>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: "Herman, Géza" <geza.herman@gmail.com>,
"Eli Zaretskii" <eliz@gnu.org>,
"Philip Kaludercic" <philipk@posteo.net>,
wellons@nullprogram.com, emacs-devel <emacs-devel@gnu.org>,
"Gerd Möllmann" <gerd.moellmann@gmail.com>
Subject: Re: I created a faster JSON parser
Date: Tue, 12 Mar 2024 16:23:59 +0100 [thread overview]
Message-ID: <875xxr8oa0.fsf@gmail.com> (raw)
In-Reply-To: <BEBBF644-AC34-4C18-A395-53207E8DB04A@gmail.com>
Mattias Engdegård <mattias.engdegard@gmail.com> writes:
> 12 mars 2024 kl. 11.58 skrev Herman, Géza
> <geza.herman@gmail.com>:
>
>>> You can't test that code is GC-safe, you have to show that
>>> it's correct by design.
>>
>> Sure, but there has to be an explanation why the current way
>> doesn't have any problems.
>
> It doesn't matter -- we don't need to prove to you why you don't
> get a segfault, it's you who need to convince us that your code
> is fine.
>
> Most C code does not need any special attention as long as it
> only
> places Lisp roots in local variables, ie, on the C stack and in
> registers. Your code keeps live roots in heap-allocated
> memory. It's
> not alone in doing that, but elsewhere we give those roots
> special
> attention, either by explicit GC marking or disabling GC during
> the
> lifespan of those roots.
>
> As I said your code is probably safe unless it signals an error.
Sorry, but I don't understand. If my parser puts roots in
heap-allocated memory (that's true), and doesn't give such roots
special attention (that's also true), then why is it probably
safe?
next prev parent reply other threads:[~2024-03-12 15:23 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 10:27 I created a faster JSON parser Herman, Géza
2024-03-08 11:41 ` Philip Kaludercic
2024-03-08 12:34 ` Herman, Géza
2024-03-08 12:03 ` Eli Zaretskii
2024-03-08 12:38 ` Herman, Géza
2024-03-08 12:59 ` Eli Zaretskii
2024-03-08 13:12 ` Herman, Géza
2024-03-08 14:10 ` Eli Zaretskii
2024-03-08 14:24 ` Collin Funk
2024-03-08 15:20 ` Herman, Géza
2024-03-08 16:22 ` Eli Zaretskii
2024-03-08 18:34 ` Herman, Géza
2024-03-08 19:57 ` Eli Zaretskii
2024-03-08 20:22 ` Herman, Géza
2024-03-09 6:52 ` Eli Zaretskii
2024-03-09 11:08 ` Herman, Géza
2024-03-09 12:23 ` Lynn Winebarger
2024-03-09 12:58 ` Po Lu
2024-03-09 13:13 ` Eli Zaretskii
2024-03-09 14:00 ` Herman, Géza
2024-03-09 14:21 ` Eli Zaretskii
2024-03-08 13:28 ` Po Lu
2024-03-08 16:14 ` Herman, Géza
2024-03-09 1:55 ` Po Lu
2024-03-09 20:37 ` Christopher Wellons
2024-03-10 6:31 ` Eli Zaretskii
2024-03-10 21:39 ` Philip Kaludercic
2024-03-11 13:29 ` Eli Zaretskii
2024-03-11 14:05 ` Mattias Engdegård
2024-03-11 14:35 ` Herman, Géza
2024-03-12 9:26 ` Mattias Engdegård
2024-03-12 10:20 ` Gerd Möllmann
2024-03-12 11:14 ` Mattias Engdegård
2024-03-12 11:33 ` Gerd Möllmann
2024-03-15 13:35 ` Herman, Géza
2024-03-15 14:56 ` Gerd Möllmann
2024-03-19 18:49 ` Mattias Engdegård
2024-03-19 19:05 ` Herman, Géza
2024-03-19 19:18 ` Gerd Möllmann
2024-03-19 19:13 ` Gerd Möllmann
2024-03-12 10:58 ` Herman, Géza
2024-03-12 13:11 ` Mattias Engdegård
2024-03-12 13:42 ` Mattias Engdegård
2024-03-12 15:23 ` Herman, Géza [this message]
2024-03-12 15:39 ` Gerd Möllmann
2024-03-10 6:58 ` Herman, Géza
2024-03-10 16:54 ` Christopher Wellons
2024-03-10 20:41 ` Herman, Géza
2024-03-10 23:22 ` Christopher Wellons
2024-03-11 9:34 ` Herman, Géza
2024-03-11 13:47 ` Christopher Wellons
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875xxr8oa0.fsf@gmail.com \
--to=geza.herman@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=gerd.moellmann@gmail.com \
--cc=mattias.engdegard@gmail.com \
--cc=philipk@posteo.net \
--cc=wellons@nullprogram.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.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).