Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: tlug: more gcc crap
- To: tlug@example.com, sstone@example.com
- Subject: Re: tlug: more gcc crap
- From: "Andrew S. Howell" <andy@example.com>
- Date: Thu, 05 Mar 1998 12:30:53 +0900
- Content-Transfer-Encoding: 7bit
- Content-Type: Text/Plain; charset=us-ascii
- In-Reply-To: Your message of "Thu, 5 Mar 1998 12:13:36 +0900 (JST)"<Pine.LNX.3.96.980305121131.31202y-100000@example.com>
- References: <Pine.LNX.3.96.980305121131.31202y-100000@example.com>
- Reply-To: tlug@example.com
- Sender: owner-tlug@example.com
>>>>> "Scott" == Scott Stone <sstone@example.com> writes: Scott> Ok, suppose I have a variable: Scott> char *s0; Scott> it's been malloced with Scott> s0=(char *)malloc(80); Scott> The function it's in does: Scott> sprintf(s0,"some_text %s some_text",some_other_string_var); Scott> newtWinMessage("Title","Ok",s0); If "some_other_string_var" is more than 80 characters, your in trouble. Take a look with gdb and see how long it is, or try a strlen of it. Its also possible that newtWinMessage is overwriting it. Scott> if (s0) free(s0); Scott> what the heck causes something like this? It seems like Scott> the if clause would prevent this sort of crap.. it's acting Scott> like I'm trying to free an un-malloced pointer... ... which points to s0 being written past its end You may have some luck by using gdb's watch command, `watch EXPR' Set a watchpoint for an expression. GDB will break when EXPR is written into by the program and its value changes. This can be Andy --------------------------------------------------------------- Next TLUG Nomikai: 11 March Wed 1998 Tengu TokyoEkiMae 19:30 Chuo-ku, Kyobashi 1-1-6, EchiZenYa Bld. B1/B2 03-3275-3691 Next TLUG Meeting: 11 April 1998 Saturday, Tokyo Station Featuring Tague Griffith of Netscape i18n talking on source code --------------------------------------------------------------- a word from the sponsor: TWICS - Japan's First Public-Access Internet System www.twics.com info@example.com Tel:03-3351-5977 Fax:03-3353-6096
- References:
- tlug: more gcc crap
- From: Scott Stone <sstone@example.com>
Home | Main Index | Thread Index
- Prev by Date: tlug: Open Source
- Next by Date: Re: tlug: more gcc crap
- Prev by thread: tlug: more gcc crap
- Next by thread: Re: tlug: more gcc crap
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links