Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-06-21
15:56 • Closed ticket [975895ffff]: Ptr2Block relies on blockPtr->b_reqsize plus ... artifact: 0d9efe4cd0 user: dkf
2004-06-19
23:13 • Ticket [975895ffff]: 4 changes artifact: 42bff2bd5d user: coldstore
16:10 • New ticket [975895ffff]. artifact: 1d61ca9532 user: coldstore

Ptr2Block relies on blockPtr->b_reqsize

Closed / Fixed975895ffffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-06-19 16:10:29
Since we know, within the Tcl_Panic, that something has
overwritten an allocation, it makes no sense to rely
upon the b_reqsize field being within reasonable bounds.

In the event that b_reqsize is absurdly large, the
program SEGVs instead of calling Tcl_Panic, which is
not good for debugging or bug reporting.
coldstoreplain2004-06-19 23:13:52
Logged In: YES 
user_id=19214

This is in tclThreadAlloc.c line 738 in today's HEAD
dkfplain2004-06-21 15:56:42
Logged In: YES 
user_id=79902

I've rewritten that code so as to maximize the chance of
getting a report out in the bad memory case without relying
on the block size being reasonable. It's still not perfect,
but now it only ever looks at the block size once it has
confirmed the magic numbers...
Log in (anonymous is fine) to add a comment.