* Problem report #20
@ 2006-04-11 15:48 Dan Nicolaescu
2006-04-11 17:19 ` Stuart D. Herring
0 siblings, 1 reply; 3+ messages in thread
From: Dan Nicolaescu @ 2006-04-11 15:48 UTC (permalink / raw)
CID: 20
Checker: FORWARD_NULL (help)
File: emacs/src/insdel.c
Function: prepare_to_modify_buffer
Description: Variable "preserve_ptr" tracked as NULL was passed to a function that dereferences it.
Event var_compare_op: Added "preserve_ptr" due to comparison "preserve_ptr != 0"
Also see events: [var_deref_model]
At conditional (1): "preserve_ptr != 0" taking false path
2044 if (preserve_ptr)
2045 {
2046 Lisp_Object preserve_marker;
2047 struct gcpro gcpro1;
2048 preserve_marker = Fcopy_marker (make_number (*preserve_ptr), Qnil);
2049 GCPRO1 (preserve_marker);
2050 verify_interval_modification (current_buffer, start, end);
2051 *preserve_ptr = marker_position (preserve_marker);
2052 unchain_marker (XMARKER (preserve_marker));
2053 UNGCPRO;
2054 }
2055 else
2056 verify_interval_modification (current_buffer, start, end);
2057 }
2058
2059 #ifdef CLASH_DETECTION
At conditional (2): "(current_buffer)->file_truename != Qnil" taking true path
At conditional (3): "(current_buffer)->filename != Qnil" taking true path
At conditional (4): "((current_buffer)->text)->save_modiff >= ((current_buffer)->text)->modiff" taking true path
2060 if (!NILP (current_buffer->file_truename)
2061 /* Make binding buffer-file-name to nil effective. */
2062 && !NILP (current_buffer->filename)
2063 && SAVE_MODIFF >= MODIFF)
2064 lock_file (current_buffer->file_truename);
2065 #else
2066 /* At least warn if this file has changed on disk since it was visited. */
2067 if (!NILP (current_buffer->filename)
2068 && SAVE_MODIFF >= MODIFF
2069 && NILP (Fverify_visited_file_modtime (Fcurrent_buffer ()))
2070 && !NILP (Ffile_exists_p (current_buffer->filename)))
2071 call1 (intern ("ask-user-about-supersession-threat"),
2072 current_buffer->filename);
2073 #endif /* not CLASH_DETECTION */
2074
Event var_deref_model: Variable "preserve_ptr" tracked as NULL was passed to a function that dereferences it. [model]
Also see events: [var_compare_op]
2075 signal_before_change (start, end, preserve_ptr);
2076
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem report #20
2006-04-11 15:48 Problem report #20 Dan Nicolaescu
@ 2006-04-11 17:19 ` Stuart D. Herring
2006-04-12 15:04 ` Stuart D. Herring
0 siblings, 1 reply; 3+ messages in thread
From: Stuart D. Herring @ 2006-04-11 17:19 UTC (permalink / raw)
> Event var_deref_model: Variable "preserve_ptr" tracked as NULL was passed
> to a function that dereferences it. [model]
> Also see events: [var_compare_op]
>
> 2075 signal_before_change (start, end, preserve_ptr);
signal_before_change() doesn't even -use- preserve_ptr (is that a bug?),
much less dereference it. No bug (here).
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem report #20
2006-04-11 17:19 ` Stuart D. Herring
@ 2006-04-12 15:04 ` Stuart D. Herring
0 siblings, 0 replies; 3+ messages in thread
From: Stuart D. Herring @ 2006-04-12 15:04 UTC (permalink / raw)
I previously wrote:
>> Event var_deref_model: Variable "preserve_ptr" tracked as NULL was
>> passed
>> to a function that dereferences it. [model]
>> Also see events: [var_compare_op]
>>
>> 2075 signal_before_change (start, end, preserve_ptr);
>
> signal_before_change() doesn't even -use- preserve_ptr (is that a bug?),
> much less dereference it. No bug (here).
Dan pointed out that signal_before_change does use preserve_ptr via
macros. (Thanks.) But the macros check the pointer before using it, so
signal_before_change(...,NULL) is safe, and so prepare_to_modify_buffer
(still) has no bug; it only uses preserve_ptr by passing it to
signal_before_change, and so the pointer is allowed to be NULL.
Davis
--
This product is sold by volume, not by mass. If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-04-12 15:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-11 15:48 Problem report #20 Dan Nicolaescu
2006-04-11 17:19 ` Stuart D. Herring
2006-04-12 15:04 ` Stuart D. Herring
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.