Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]tlug: gcc misplacing pointers?
- To: "Tokyo Linux Users' Group" <tlug@example.com>
- Subject: tlug: gcc misplacing pointers?
- From: Scott Stone <sstone@example.com>
- Date: Wed, 4 Mar 1998 13:32:38 +0900 (JST)
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- Reply-To: tlug@example.com
- Sender: owner-tlug@example.com
I had the strangest thing happen.. on two separate machines, with 2 different versions of libc and gcc, even..: I had a program that would segfault every time a certain function was run. The function had lines like: char *s0; s0=(char *)malloc(80); (and then proceeded to do operations on s0). Anyway, it would segfault upon leaving the function in '_libc_free()', according to gdb. What was weird, though is that if I set the breakpoint one line past the malloc statement, and said 'print s0', it would say, 'no symbol s0 in current context'. Changing s0 to be 'char s0[200]' and removing the malloc line fixed the problem. Any idea why gcc would 'lose' the pointer to s0 like that? -------------------------------------------------- Scott M. Stone <sstone@example.com, sstone@example.com> <sstone@example.com> Linux Developer/Systems Administrator for Pacific HiTech, Inc. http://www.pht.com http://armadillo.pht.co.jp http://www.pht.co.jp http://www.turbolinux.com --------------------------------------------------------------- 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
- Follow-Ups:
- Re: tlug: gcc misplacing pointers?
- From: "Andrew S. Howell" <andy@example.com>
- tlug: gcc misplacing pointers?
- From: Marcus Metzler <mocm@example.com>
Home | Main Index | Thread Index
- Prev by Date: BOUNCE tlug@example.com: Admin request: /^subject:\s*help\b/i
- Next by Date: Re: tlug: gcc misplacing pointers?
- Prev by thread: BOUNCE tlug@example.com: Admin request: /^subject:\s*help\b/i
- Next by thread: Re: tlug: gcc misplacing pointers?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links