One of the tools we have at our disposal here is Purify
(Was a product of Rational, which is now owned by IBM)
It checks every single memory access for validity and can
sometimes catch things that are problems waiting to happen.
Here are a few that I found just now...
(UMR == "Uninitialized Memory Read")
[W] UMR: Uninitialized memory read in expose {1 occurrence}
Reading 2 bytes from 0x084fd36c (2 bytes at 0x084fd36c
uninitialized)
Address 0x084fd36c is 292 bytes into a 336 byte block at 0x084fd248
Address 0x084fd36c points to a malloc'd block in heap 0x06b20000
Thread ID: 0x6e4
Error location
expose [bulletinboard.c:1394]
_XmClearBorder(XtDisplay(w), XtWindow(w),
0,0,
BB_OldWidth(w), BB_OldHeight(w),
=> BB_OldShadowThickness(w));
BB_OldWidth(w) = XtWidth(w);
BB_OldHeight(w) = XtHeight(w);
BB_OldShadowThickness(w) = MGR_ShadowThickness(w);
SendExposureEvent [event.c:1198]
CompressExposures [event.c:1098]
XtDispatchEventToWidget [event.c:891]
[W] UMR: Uninitialized memory read in XmFormFindPreferred {3 occurrences}
Reading 1 byte from 0x0b4f6e1e (1 byte at 0x0b4f6e1e uninitialized)
Address 0x0b4f6e1e is 334 bytes into a 448 byte block at 0x0b4f6cd0
Address 0x0b4f6e1e points to a malloc'd block in heap 0x06b20000
Thread ID: 0x6e4
Error location
XmFormFindPreferred [form.c:1546]
mainw/test16
*/
if (FCP_PrefH(con) == XmINVALID_DIMENSION ||
(!Form_ProcessingConstraints(f) &&
=> cg && ((cg->request_mode & CWHeight) ==
CWHeight)))
{
if (p.height > 0)
{
XmFormLayout [form.c:2010]
change_managed [form.c:870]
CallChangeManaged [intrinsic.c:250]
CallChangeManaged [intrinsic.c:242]
[W] UMR: Uninitialized memory read in XmRCGetKidGeo {1 occurrence}
Reading 1 byte from 0x0db06324 (1 byte at 0x0db06324 uninitialized)
Address 0x0db06324 is 316 bytes into a 328 byte block at 0x0db061e8
Address 0x0db06324 points to a malloc'd block in heap 0x06b20000
Thread ID: 0x6e4
Error location
XmRCGetKidGeo [rcutils.c:1202]
if (!XtIsManaged(kid_geometry->kid))
{
=> if (RCC_WasManaged(kid_geometry->kid))
{
RCC_WasManaged(kid_geometry->kid) = False;
}
XmRCAdjustSize [rcutils.c:1554]
change_managed [rowcolumn.c:1608]
CallChangeManaged [intrinsic.c:250]
CallChangeManaged [intrinsic.c:242]
Address 0x0b4f6e1e is 334 bytes into a 448 byte block at 0x0b4f6cd0
[W] UMR: Uninitialized memory read in initialize {118 occurrences}
Reading 2 bytes from 0x0d994e50 (2 bytes at 0x0d994e50
uninitialized)
Address 0x0d994e50 is 120 bytes into a 184 byte block at 0x0d994dd8
Address 0x0d994e50 points to a malloc'd block in heap 0x06b20000
Thread ID: 0x6e4
Error location
initialize [togglebg.c:796]
{
LabG_MarginLeft(new_w) += margin;
LabG_TextRect_x(new_w) += margin;
=> LabG_AccTextRect(new_w).x += margin;
}
else
LabG_MarginRight(new_w) += margin;
CallInitialize [create.c:212]
xtCreate [create.c:401]
XtCreateWidget [create.c:557]
[W] UMR: Uninitialized memory read in XmRCGetKidGeo {1 occurrence}
Reading 1 byte from 0x0db06324 (1 byte at 0x0db06324 uninitialized)
Address 0x0db06324 is 316 bytes into a 328 byte block at 0x0db061e8
Address 0x0db06324 points to a malloc'd block in heap 0x06b20000
Thread ID: 0x6e4
Error location
XmRCGetKidGeo [rcutils.c:1202]
if (!XtIsManaged(kid_geometry->kid))
{
=> if (RCC_WasManaged(kid_geometry->kid))
{
RCC_WasManaged(kid_geometry->kid) = False;
}
XmRCAdjustSize [rcutils.c:1554]
change_managed [rowcolumn.c:1608]
CallChangeManaged [intrinsic.c:250]
CallChangeManaged [intrinsic.c:242]
Address 0x0b4f6e1e is 334 bytes into a 448 byte block at 0x0b4f6cd0
-- Dave Williss
------
Meddle not in the affairs of dragons,
for you are crunchy and taste good with catsup
_______________________________________________
Lesstif mailing list
[EMAIL PROTECTED]
https://terror.hungry.com/mailman/listinfo/lesstif