Tk Source Code

Check-in [8c00370c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix [3020550fff]: Do not crash or leave dangling entries when grid or place is used on a half-dead window.

"grid .x -in .f" in a <Destroy> binding of .f dereferenced a NULL container, and "place" on a half-dead window or with a half-dead -in container added a hash entry for a window about to be freed, which later led to a use-after-free. Now a half-dead window is ignored, and content put -in a half-dead container is left unmanaged and unmapped.

Downloads: See separate download page
Timelines: family | ancestors | descendants | both | halfdead-geometry-crash
Files: files | file ages | folders
SHA3-256: 8c00370c359e144297fa93649cf034a052cec89a93383609ad99272c6e1959ec
User & Date: serhiy.storchaka 2026-09-24 09:39:54.007
Original Comment: Do not crash or leave dangling entries when grid or place is used on a half-dead window.

"grid .x -in .f" in a <Destroy> binding of .f dereferenced a NULL container, and "place" on a half-dead window or with a half-dead -in container added a hash entry for a window about to be freed, which later led to a use-after-free. Now a half-dead window is ignored, and content put -in a half-dead container is left unmanaged and unmapped. [Bug 3020550]

Context
2026-10-09
15:39
Fix [3020550fff]: Do not crash or leave dangling entries when grid or place is used on a half-dead window check-in: d5f1c2d5 user: jan.nijtmans tags: trunk, main
2026-09-24
09:39
Fix [3020550fff]: Do not crash or leave dangling entries when grid or place is used on a half-dead window.

"grid .x -in .f" in a <Destroy> binding of .f dereferenced a NULL container, and "place" on a half-dead window or with a half-dead -in container added a hash entry for a window about to be freed, which later led to a use-after-free. Now a half-dead window is ignored, and content put -in a half-dead container is left unmanaged and unmapped. closed check-in: 8c00370c user: serhiy.storchaka tags: halfdead-geometry-crash

2026-09-23
10:33
Fix for [3de1b72157]: ttk::notebook takes the focus when clicked, even with the -takefocus 0 option. check-in: a695f427 user: csaba tags: trunk, main
Changes
Unified Diff Side-by-Side Diff Patch
Changes to generic/tkGrid.c.
Changes to generic/tkPlace.c.
Changes to tests/grid.test.
Changes to tests/place.test.