[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
extract_data_from_object considered dangerous
From: |
Stefan Monnier |
Subject: |
extract_data_from_object considered dangerous |
Date: |
Sun, 22 Sep 2019 09:39:54 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
I was just looking at the calling convention of extract_data_from_object
and it seems intrinsically dangerous:
It returns a char* into a Lisp_Object without associating it with
any specific Lisp_Object
In some cases, the Lisp_Object into which the result points is freshly
allocated during the call, so once we return from the function, there is
no Lisp_Object reference to it anywhere any more to keep it from
being GC'd.
Stefan
- extract_data_from_object considered dangerous,
Stefan Monnier <=