[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Run time memory error in TBL.
From: |
Doug Royer |
Subject: |
[Groff] Run time memory error in TBL. |
Date: |
Fri, 27 Dec 2002 19:01:58 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 |
While testing my code to add cell line point-size to tables
I ran into the following memory error using Sun's DBX with
memory checking. It looks legitimate.
Does anyone know about this?
And FYI - My code seems to be working and I'll be testing it next week.
Followed by a patch to the list for comments/corrections.
This is in (TBL) main.cc. The line numbers may be off
because of my changes. I temporally commented out the
libgroff 'new' and it gets the same error so the problem
is not in 'new' as reported.
Here is the run time error
RTC: Enabling Error Checking...
RTC: Running program...
Read from uninitialized (rui):
Attempting to read 2 bytes at address 0xa5f7e
which is 30 bytes into a heap block of size 72 bytes at 0xa5f60
This block was allocated from:
[1] operator new() at line 43 in "new.cc"
[2] process_format() at line 837 in "main.cc"
[3] process_table() at line 1524 in "main.cc"
[4] process_input_file() at line 238 in "main.cc"
[5] main() at line 1604 in "main.cc"
stopped in entry_format::operator= at 0x3fdec
0x0003fdec: operator=+0x0064: ba,a operator=+0x5fe10
(dbx) up
Current function is process_format
1144 f->entry[row][col] = *tem;
(dbx) whatis f->entry[row][col]
struct entry_format : public entry_modifier {
entry_format::entry_format(enum format_type t);
entry_format::entry_format();
void entry_format::debug_print() const;
enum format_type type;
};
(dbx) print sizeof( f->entry[row][col])
sizeof(f->entry[row][col]) = 36
(dbx) whatis tem
struct input_entry_format *tem;
(dbx) whatis *tem
struct input_entry_format : public entry_format {
input_entry_format::input_entry_format(enum format_type t, struct
input_entry_format *p = <default>);
input_entry_format::~input_entry_format();
void input_entry_format::debug_print();
struct input_entry_format *next;
class string width;
int separation;
int vline;
int pre_vline;
int last_column;
int equal;
};
(dbx) pring sizeof(*tem)
sizeof(*tem) = 72
--
Doug Royer | http://INET-Consulting.com
-------------------------------|-----------------------------
(dbx) pring sizeof(*tem)
sizeof(*tem) = 72
--
Doug Royer | http://INET-Consulting.com
-------------------------------|-----------------------------
address@hidden | Office: (208)612-INET
http://Royer.com/People/Doug | Fax: (866)594-8574
| Cell: (208)520-4044
We Do Standards - You Need Standards
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Groff] Run time memory error in TBL.,
Doug Royer <=