* Buffer/window/frame redisplay bit
@ 2014-01-20 11:42 Dmitry Antipov
2014-01-20 13:52 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Antipov @ 2014-01-20 11:42 UTC (permalink / raw)
To: Emacs development discussions; +Cc: Stefan Monnier
I've noticed that windows are created with zero redisplay bit, new
frames has this bit set, but buffer texts leaves them uninitialized.
This is sometimes shown by valgrind, for example:
==15146== Conditional jump or move depends on uninitialised value(s)
==15146== at 0x45D7A0: propagate_buffer_redisplay (xdisp.c:13153)
==15146== by 0x45EC14: redisplay_internal (xdisp.c:13608)
==15146== by 0x45CB74: redisplay (xdisp.c:12919)
==15146== by 0x56BECA: read_char (keyboard.c:2563)
==15146== by 0x57B32F: read_key_sequence (keyboard.c:9071)
==15146== by 0x568EF0: command_loop_1 (keyboard.c:1445)
==15146== by 0x608602: internal_condition_case (eval.c:1345)
==15146== by 0x5687CC: command_loop_2 (keyboard.c:1170)
==15146== by 0x607A85: internal_catch (eval.c:1109)
==15146== by 0x568780: command_loop (keyboard.c:1149)
==15146== by 0x567E30: recursive_edit_1 (keyboard.c:777)
==15146== by 0x568000: Frecursive_edit (keyboard.c:841)
IMO b->text->redisplay should be initialized in Fget_buffer_create, but
I have no representative test case to decide whether it should be 0 or 1.
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Buffer/window/frame redisplay bit
2014-01-20 11:42 Buffer/window/frame redisplay bit Dmitry Antipov
@ 2014-01-20 13:52 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-01-20 13:52 UTC (permalink / raw)
To: Dmitry Antipov; +Cc: Emacs development discussions
> IMO b->text->redisplay should be initialized in Fget_buffer_create, but
> I have no representative test case to decide whether it should be 0 or 1.
The initial value doesn't matter:
- This bit is only needed when the buffer is displayed in a window and
only if that window's `redisplay' bit is itself equal to `false'.
- At the time the buffer is created it's not shown in any window.
- Whenever we change which buffer is shown in a window, we set that
window's `redisplay' to `true'.
So if you want to initialize it, feel free. `false' is a good initial value.
`true' is also a good initial value.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-20 13:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-20 11:42 Buffer/window/frame redisplay bit Dmitry Antipov
2014-01-20 13:52 ` Stefan Monnier
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.