From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nimar Arora To: gcc@gcc.gnu.org Cc: gcc-bugs@gcc.gnu.org Subject: Strange strings in GCC compiled code Date: Tue, 07 Sep 1999 15:52:00 -0000 Message-id: <19990907225545.17585.rocketmail@web906.mail.yahoo.com> X-SW-Source: 1999-09/msg00249.html Hello GCC Gurus, I recently downloaded and installed GCC-2.95 on Win95 and compiled the standard Hello World program. The program runs fine but after running 'strings' on the executable, a.exe, I found the following HTML tags which include private information like login name on Web mail servers. What is going on? How do I turn off generation of this information? Thanks, Nimar. 03366;text-decoration:none">Inbox    Add resses    To: Nimar Arora Cc: gcc@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: Strange strings in GCC compiled code Date: Tue, 07 Sep 1999 16:21:00 -0000 Message-id: References: <19990907225545.17585.rocketmail@web906.mail.yahoo.com> X-SW-Source: 1999-09/msg00250.html Nimar Arora writes: > I recently downloaded and installed GCC-2.95 on Win95 and compiled the > standard Hello World program. The program runs fine but after running > 'strings' on the executable, a.exe, I found the following HTML tags > which include private information like login name on Web mail servers. I've not personally verified the following, but I've heard it a sufficient number of times from sources I trust that I'm pretty confident it's the explanation: Windows doesn't clear out blocks used by old files; it happily reuses them with their data intact, just puts an end of file marker before the old junk. So it's quite common to see all sorts of random old data off your disk end up at the end of various files. If the above guess is right, it's a file system property, and there isn't much gcc can do about it. gcc isn't doing this intentionally. -- Russ Allbery (rra@stanford.edu) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: gcc@gcc.gnu.org Cc: gcc-bugs@gcc.gnu.org, Nimar Arora Subject: Re: Strange strings in GCC compiled code Date: Wed, 08 Sep 1999 01:46:00 -0000 Message-id: <199909080845.EAA25575@mescaline.gnu.org> References: <19990907225545.17585.rocketmail@web906.mail.yahoo.com> X-SW-Source: 1999-09/msg00272.html > I recently downloaded and installed GCC-2.95 on Win95 and compiled the > standard Hello World program. The program runs fine but after running > 'strings' on the executable, a.exe, I found the following HTML tags > which include private information like login name on Web mail servers. > What is going on? Please always make a point of telling which port of GCC are you using. If it is the DJGPP port, I might have a solution for this problem. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Russ Allbery Cc: gcc@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: Strange strings in GCC compiled code Date: Wed, 08 Sep 1999 01:50:00 -0000 Message-id: <199909080848.EAA25629@mescaline.gnu.org> References: <19990907225545.17585.rocketmail@web906.mail.yahoo.com> X-SW-Source: 1999-09/msg00274.html > Windows doesn't clear out blocks used by old files; it happily reuses them > with their data intact, just puts an end of file marker before the old > junk. So it's quite common to see all sorts of random old data off your > disk end up at the end of various files. The above is true AFAIK. However, it doesn't have anything to do with the problem described by the original poster. The problem was that this junk was reported by the `strings' utility. Since `strings' uses normal file I/O (as opposed to direct disk reads), it cannot see anything beyond the last byte of the actual file data. The junk you describe begins *after* the file's data. In other words, the junk reported by the original poster was part of the file's data, not something beyond the (logical) EOF marker. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Ing-Simmons To: eliz@gnu.org Cc: gcc@gcc.gnu.org, gcc-bugs@gcc.gnu.org, Russ Allbery Subject: Re: Strange strings in GCC compiled code Date: Wed, 08 Sep 1999 02:10:00 -0000 Message-id: <199909080908.KAA11263@tiuk.ti.com> References: <19990907225545.17585.rocketmail@web906.mail.yahoo.com> <199909080848.EAA25629@mescaline.gnu.org> X-SW-Source: 1999-09/msg00276.html Eli Zaretskii writes: >> Windows doesn't clear out blocks used by old files; it happily reuses them >> with their data intact, just puts an end of file marker before the old >> junk. So it's quite common to see all sorts of random old data off your >> disk end up at the end of various files. > >The above is true AFAIK. However, it doesn't have anything to do with >the problem described by the original poster. The problem was that >this junk was reported by the `strings' utility. Since `strings' uses >normal file I/O (as opposed to direct disk reads), it cannot see >anything beyond the last byte of the actual file data. The junk you >describe begins *after* the file's data. > >In other words, the junk reported by the original poster was part of >the file's data, not something beyond the (logical) EOF marker. But if (as is likely) binutils seeks down the file and does a write then junk is exposed if not overwritten. -- Nick Ing-Simmons Via, but not speaking for: Texas Instruments Ltd. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Nick Ing-Simmons Cc: gcc@gcc.gnu.org, gcc-bugs@gcc.gnu.org, Russ Allbery Subject: Re: Strange strings in GCC compiled code Date: Wed, 08 Sep 1999 04:25:00 -0000 Message-id: <199909081123.HAA30264@mescaline.gnu.org> References: <199909080908.KAA11263@tiuk.ti.com> <19990907225545.17585.rocketmail@web906.mail.yahoo.com> <199909080848.EAA25629@mescaline.gnu.org> X-SW-Source: 1999-09/msg00282.html > But if (as is likely) binutils seeks down the file and does a write > then junk is exposed if not overwritten. I don't think Binutils work this way, at least not on all platforms. Also, if this *does* happen, the junk usually comes from memory, not from the disk. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nimar Arora To: Eli Zaretskii , gcc@gcc.gnu.org Cc: gcc-bugs@gcc.gnu.org, Nimar Arora Subject: Re: Strange strings in GCC compiled code Date: Wed, 08 Sep 1999 13:32:00 -0000 Message-id: <19990908203006.16777.rocketmail@web901.mail.yahoo.com> X-SW-Source: 1999-09/msg00303.html I'm using MINGW. i.e. the version which relies only on CRTDLL. -- Nimar --- Eli Zaretskii wrote: > > > I recently downloaded and installed GCC-2.95 on > Win95 and compiled the > > standard Hello World program. The program runs > fine but after running > > 'strings' on the executable, a.exe, I found the > following HTML tags > > which include private information like login name > on Web mail servers. > > What is going on? > > Please always make a point of telling which port of > GCC are you > using. If it is the DJGPP port, I might have a > solution for this > problem. > __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mumit Khan To: Nimar Arora Cc: Eli Zaretskii , gcc@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: Strange strings in GCC compiled code Date: Wed, 08 Sep 1999 14:39:00 -0000 Message-id: <199909082026.PAA24899@mercury.xraylith.wisc.edu> References: <19990908203006.16777.rocketmail@web901.mail.yahoo.com> X-SW-Source: 1999-09/msg00310.html Nimar Arora writes: > I'm using MINGW. i.e. the version which relies only on CRTDLL. > > -- Nimar > > --- Eli Zaretskii wrote: > > > > > I recently downloaded and installed GCC-2.95 on > > Win95 and compiled the > > > standard Hello World program. The program runs > > fine but after running > > > 'strings' on the executable, a.exe, I found the > > following HTML tags > > > which include private information like login name > > on Web mail servers. > > > What is going on? > > > > Please always make a point of telling which port of > > GCC are you > > using. If it is the DJGPP port, I might have a > > solution for this > > problem. This is an OS (if you can call Windows 9x an OS ;-) issue, which does not zero out the file area if you seek past the end and then write. NT does handle it correctly, and I believe Windows 2000 does as well. You can always complain to the OS vendor as to why they allow such a hole in the OS. I suppose we'll have to deal with this in binutils sooner or later. It's on my todo list (and I have contributed patches that I haven't had time to look at yet). Binutils maintainer Ian Taylor knows about this problem as well. Cygwin works around this issue, but since Mingw uses Microsoft's own runtime, we can't do the same for Mingw without some ugly hacks. Regards, Mumit From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Ing-Simmons To: eliz@gnu.org Cc: gcc@gcc.gnu.org, gcc-bugs@gcc.gnu.org, Russ Allbery Subject: Re: Strange strings in GCC compiled code Date: Thu, 30 Sep 1999 18:02:00 -0000 Message-ID: <199909080908.KAA11263@tiuk.ti.com> References: <19990907225545.17585.rocketmail@web906.mail.yahoo.com> <199909080848.EAA25629@mescaline.gnu.org> X-SW-Source: 1999-09n/msg00276.html Message-ID: <19990930180200.CxYRpUtLHqI7dNACz3ePWleb-fQKo9-d7DOYuHAaxyg@z> Eli Zaretskii writes: >> Windows doesn't clear out blocks used by old files; it happily reuses them >> with their data intact, just puts an end of file marker before the old >> junk. So it's quite common to see all sorts of random old data off your >> disk end up at the end of various files. > >The above is true AFAIK. However, it doesn't have anything to do with >the problem described by the original poster. The problem was that >this junk was reported by the `strings' utility. Since `strings' uses >normal file I/O (as opposed to direct disk reads), it cannot see >anything beyond the last byte of the actual file data. The junk you >describe begins *after* the file's data. > >In other words, the junk reported by the original poster was part of >the file's data, not something beyond the (logical) EOF marker. But if (as is likely) binutils seeks down the file and does a write then junk is exposed if not overwritten. -- Nick Ing-Simmons Via, but not speaking for: Texas Instruments Ltd. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Russ Allbery Cc: gcc@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: Strange strings in GCC compiled code Date: Thu, 30 Sep 1999 18:02:00 -0000 Message-ID: <199909080848.EAA25629@mescaline.gnu.org> References: <19990907225545.17585.rocketmail@web906.mail.yahoo.com> X-SW-Source: 1999-09n/msg00274.html Message-ID: <19990930180200.EvdiHXbBeK4UD6PzPGqxRy8vbUh0G1y3OgE_gV-V9o4@z> > Windows doesn't clear out blocks used by old files; it happily reuses them > with their data intact, just puts an end of file marker before the old > junk. So it's quite common to see all sorts of random old data off your > disk end up at the end of various files. The above is true AFAIK. However, it doesn't have anything to do with the problem described by the original poster. The problem was that this junk was reported by the `strings' utility. Since `strings' uses normal file I/O (as opposed to direct disk reads), it cannot see anything beyond the last byte of the actual file data. The junk you describe begins *after* the file's data. In other words, the junk reported by the original poster was part of the file's data, not something beyond the (logical) EOF marker. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nimar Arora To: Eli Zaretskii , gcc@gcc.gnu.org Cc: gcc-bugs@gcc.gnu.org, Nimar Arora Subject: Re: Strange strings in GCC compiled code Date: Thu, 30 Sep 1999 18:02:00 -0000 Message-ID: <19990908203006.16777.rocketmail@web901.mail.yahoo.com> X-SW-Source: 1999-09n/msg00303.html Message-ID: <19990930180200.yk4Cgmvqo0_fUBPj9QtQE2uu19yAedYTECA7TFhEFls@z> I'm using MINGW. i.e. the version which relies only on CRTDLL. -- Nimar --- Eli Zaretskii wrote: > > > I recently downloaded and installed GCC-2.95 on > Win95 and compiled the > > standard Hello World program. The program runs > fine but after running > > 'strings' on the executable, a.exe, I found the > following HTML tags > > which include private information like login name > on Web mail servers. > > What is going on? > > Please always make a point of telling which port of > GCC are you > using. If it is the DJGPP port, I might have a > solution for this > problem. > __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: gcc@gcc.gnu.org Cc: gcc-bugs@gcc.gnu.org, Nimar Arora Subject: Re: Strange strings in GCC compiled code Date: Thu, 30 Sep 1999 18:02:00 -0000 Message-ID: <199909080845.EAA25575@mescaline.gnu.org> References: <19990907225545.17585.rocketmail@web906.mail.yahoo.com> X-SW-Source: 1999-09n/msg00272.html Message-ID: <19990930180200.tOoR4Ba015r5J2HtbOt0j4iKDs8DcCyjV9NA1nEj4lA@z> > I recently downloaded and installed GCC-2.95 on Win95 and compiled the > standard Hello World program. The program runs fine but after running > 'strings' on the executable, a.exe, I found the following HTML tags > which include private information like login name on Web mail servers. > What is going on? Please always make a point of telling which port of GCC are you using. If it is the DJGPP port, I might have a solution for this problem. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Nick Ing-Simmons Cc: gcc@gcc.gnu.org, gcc-bugs@gcc.gnu.org, Russ Allbery Subject: Re: Strange strings in GCC compiled code Date: Thu, 30 Sep 1999 18:02:00 -0000 Message-ID: <199909081123.HAA30264@mescaline.gnu.org> References: <199909080908.KAA11263@tiuk.ti.com> <19990907225545.17585.rocketmail@web906.mail.yahoo.com> <199909080848.EAA25629@mescaline.gnu.org> X-SW-Source: 1999-09n/msg00282.html Message-ID: <19990930180200.Zr9Kj4ZK-rrkzMrS-gELlUhvDnKbW_DqCNYANiyWUec@z> > But if (as is likely) binutils seeks down the file and does a write > then junk is exposed if not overwritten. I don't think Binutils work this way, at least not on all platforms. Also, if this *does* happen, the junk usually comes from memory, not from the disk. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nimar Arora To: gcc@gcc.gnu.org Cc: gcc-bugs@gcc.gnu.org Subject: Strange strings in GCC compiled code Date: Thu, 30 Sep 1999 18:02:00 -0000 Message-ID: <19990907225545.17585.rocketmail@web906.mail.yahoo.com> X-SW-Source: 1999-09n/msg00249.html Message-ID: <19990930180200.y3d664-LTUuUuCwO4RayJ-nCvpxxZNJfKPQNfbXCD_4@z> Hello GCC Gurus, I recently downloaded and installed GCC-2.95 on Win95 and compiled the standard Hello World program. The program runs fine but after running 'strings' on the executable, a.exe, I found the following HTML tags which include private information like login name on Web mail servers. What is going on? How do I turn off generation of this information? Thanks, Nimar. 03366;text-decoration:none">Inbox    Add resses    To: Nimar Arora Cc: Eli Zaretskii , gcc@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: Strange strings in GCC compiled code Date: Thu, 30 Sep 1999 18:02:00 -0000 Message-ID: <199909082026.PAA24899@mercury.xraylith.wisc.edu> References: <19990908203006.16777.rocketmail@web901.mail.yahoo.com> X-SW-Source: 1999-09n/msg00310.html Message-ID: <19990930180200.X36Bxf3fE0gXN0yk2k-n2lm1YMuDCQgzDWb25OiKPjc@z> Nimar Arora writes: > I'm using MINGW. i.e. the version which relies only on CRTDLL. > > -- Nimar > > --- Eli Zaretskii wrote: > > > > > I recently downloaded and installed GCC-2.95 on > > Win95 and compiled the > > > standard Hello World program. The program runs > > fine but after running > > > 'strings' on the executable, a.exe, I found the > > following HTML tags > > > which include private information like login name > > on Web mail servers. > > > What is going on? > > > > Please always make a point of telling which port of > > GCC are you > > using. If it is the DJGPP port, I might have a > > solution for this > > problem. This is an OS (if you can call Windows 9x an OS ;-) issue, which does not zero out the file area if you seek past the end and then write. NT does handle it correctly, and I believe Windows 2000 does as well. You can always complain to the OS vendor as to why they allow such a hole in the OS. I suppose we'll have to deal with this in binutils sooner or later. It's on my todo list (and I have contributed patches that I haven't had time to look at yet). Binutils maintainer Ian Taylor knows about this problem as well. Cygwin works around this issue, but since Mingw uses Microsoft's own runtime, we can't do the same for Mingw without some ugly hacks. Regards, Mumit From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russ Allbery To: Nimar Arora Cc: gcc@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: Strange strings in GCC compiled code Date: Thu, 30 Sep 1999 18:02:00 -0000 Message-ID: References: <19990907225545.17585.rocketmail@web906.mail.yahoo.com> X-SW-Source: 1999-09n/msg00250.html Message-ID: <19990930180200.3zYpb0uuY4AGDrnICB5y6a56I920YTdPsA7uG10f0WY@z> Nimar Arora writes: > I recently downloaded and installed GCC-2.95 on Win95 and compiled the > standard Hello World program. The program runs fine but after running > 'strings' on the executable, a.exe, I found the following HTML tags > which include private information like login name on Web mail servers. I've not personally verified the following, but I've heard it a sufficient number of times from sources I trust that I'm pretty confident it's the explanation: Windows doesn't clear out blocks used by old files; it happily reuses them with their data intact, just puts an end of file marker before the old junk. So it's quite common to see all sorts of random old data off your disk end up at the end of various files. If the above guess is right, it's a file system property, and there isn't much gcc can do about it. gcc isn't doing this intentionally. -- Russ Allbery (rra@stanford.edu)