digitalmars.D.learn - Any way to workaround Optlink crash?
- Denis Koroskin (6/6) Aug 31 2009 I was refactoring the following line of code:
- Tom S (13/24) Aug 31 2009 I guess this is just a random instance of OPTLINK's bug. I recommend
- Max Samukha (4/9) Aug 31 2009 And please vote for
- Tom S (9/18) Sep 01 2009 I think he knows... But it's a lot of work to write a new linker.
- Max Samukha (6/23) Sep 01 2009 I am sure it is a lot of work for a single person to do. That's why it w...
- =?ISO-8859-1?Q?=22J=E9r=F4me_M=2E_Berger=22?= (10/18) Sep 01 2009 GNU ld supports these formats on *nix, windows and MacOS. It has=20
- div0 (14/28) Sep 01 2009 -----BEGIN PGP SIGNED MESSAGE-----
- =?ISO-8859-1?Q?=22J=E9r=F4me_M=2E_Berger=22?= (11/28) Sep 02 2009 y
- grauzone (4/34) Sep 02 2009 Probably that wasn't really clear: dmd on Linux uses GNU ld for linking....
- Nick Sabalausky (10/22) Sep 02 2009 I don't mean to sound patronizing, but you did try clearing out all the
I was refactoring the following line of code: foo(rand() % 256); -> foo(0); and that causes Optlink to crash now. Any reason why it does so? That particular file is just 157 lines long, but the whole project is quite big, although there are no large files. The biggest one is ~140K, it's from win32 bindings project (only defines a bunch of constants, and does little impact on output file size), that I use for a few years now, and they never caused any problem to me. My files are 40K max. I believe that line of code has no direct relation to Optlink crash, but I still post it just to show that it's code simplification that leads to crash, not adding any new type or symbol or anything. Thanks for any hint.
Aug 31 2009
Denis Koroskin wrote:I was refactoring the following line of code: foo(rand() % 256); -> foo(0); and that causes Optlink to crash now. Any reason why it does so? That particular file is just 157 lines long, but the whole project is quite big, although there are no large files. The biggest one is ~140K, it's from win32 bindings project (only defines a bunch of constants, and does little impact on output file size), that I use for a few years now, and they never caused any problem to me. My files are 40K max. I believe that line of code has no direct relation to Optlink crash, but I still post it just to show that it's code simplification that leads to crash, not adding any new type or symbol or anything. Thanks for any hint.I guess this is just a random instance of OPTLINK's bug. I recommend sacrificing your firstborn. Or if that doesn't work, change the order in which you pass modules to the compiler - certain symbols (template instantiations, initializers, classinfo, etc) will end up in different object files and that might hit OPTLINK's sweet spot. And/or compile some modules without -g. Maybe you don't need debug symbols everywhere. -- Tomasz Stachowiak http://h3.team0xf.com/ h3/h3r3tic on #D freenode
Aug 31 2009
Tom S wrote:And/or compile some modules without -g. Maybe you don't need debug symbols everywhere.And please vote for http://d.puremagic.com/issues/votes.cgi?action=show_bug&bug_id=424. Something makes Walter think this bug is not critical.
Aug 31 2009
Max Samukha wrote:Tom S wrote:I think he knows... But it's a lot of work to write a new linker. COFF/ELF output would not be that bad though, at least if there's some linker that supports these *and* its license allows it to be bundled with DMD. -- Tomasz Stachowiak http://h3.team0xf.com/ h3/h3r3tic on #D freenodeAnd/or compile some modules without -g. Maybe you don't need debug symbols everywhere.And please vote for http://d.puremagic.com/issues/votes.cgi?action=show_bug&bug_id=424. Something makes Walter think this bug is not critical.
Sep 01 2009
Tom S wrote:Max Samukha wrote:I am sure it is a lot of work for a single person to do. That's why it would be nice of Walter if he gave us a hint whether the bug is fixable at all and how high it is on his priority list.Tom S wrote:I think he knows... But it's a lot of work to write a new linker.And/or compile some modules without -g. Maybe you don't need debug symbols everywhere.And please vote for http://d.puremagic.com/issues/votes.cgi?action=show_bug&bug_id=424. Something makes Walter think this bug is not critical.COFF/ELF output would not be that bad though, at least if there's some linker that supports these *and* its license allows it to be bundled with DMD.I doubt such a linker exists. And if it does, I doubt it is of quality good enough to replace OPTLINK.
Sep 01 2009
Max Samukha wrote:Tom S wrote:Max Samukha wrote: COFF/ELF output would not be that bad though, at least if there's some=good=20linker that supports these *and* its license allows it to be bundled with DMD.I doubt such a linker exists. And if it does, I doubt it is of quality =enough to replace OPTLINK. =20GNU ld supports these formats on *nix, windows and MacOS. It has=20 very good quality and its license allows it to be bundled with=20 anything... Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Sep 01 2009
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jérôme M. Berger wrote:Max Samukha wrote:Yeah but have you actually linked a D program with it? (esp. on 'doze) - -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFKnZkuT9LetA9XoXwRAv5BAJ4+P/lRQsHCVN/eDrZaAgPvHsbWZACdF/Dx 7CQ28E5zAM4v2aNWM9RCMms= =kOpB -----END PGP SIGNATURE-----Tom S wrote:GNU ld supports these formats on *nix, windows and MacOS. It has very good quality and its license allows it to be bundled with anything... JeromeMax Samukha wrote: COFF/ELF output would not be that bad though, at least if there's some linker that supports these *and* its license allows it to be bundled with DMD.I doubt such a linker exists. And if it does, I doubt it is of quality good enough to replace OPTLINK.
Sep 01 2009
div0 wrote:J=E9r=F4me M. Berger wrote:meMax Samukha wrote:Tom S wrote:Max Samukha wrote: COFF/ELF output would not be that bad though, at least if there's so=linker that supports these *and* its license allows it to be bundled=ywith DMD.I doubt such a linker exists. And if it does, I doubt it is of qualit=g...good enough to replace OPTLINK.GNU ld supports these formats on *nix, windows and MacOS. It has very good quality and its license allows it to be bundled with anythin==20Yes, using gdc (on both 'doze and 'nux). All you need is COFF=20 output from the compiler. Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.frJerome=20 Yeah but have you actually linked a D program with it? (esp. on 'doze) =20
Sep 02 2009
div0 wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jérôme M. Berger wrote:Probably that wasn't really clear: dmd on Linux uses GNU ld for linking. Walter has an ELF backend for this. Walter also wrote a backend for Mach for the MacOSX port.Max Samukha wrote:Yeah but have you actually linked a D program with it? (esp. on 'doze)Tom S wrote:GNU ld supports these formats on *nix, windows and MacOS. It has very good quality and its license allows it to be bundled with anything... JeromeMax Samukha wrote: COFF/ELF output would not be that bad though, at least if there's some linker that supports these *and* its license allows it to be bundled with DMD.I doubt such a linker exists. And if it does, I doubt it is of quality good enough to replace OPTLINK.- -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFKnZkuT9LetA9XoXwRAv5BAJ4+P/lRQsHCVN/eDrZaAgPvHsbWZACdF/Dx 7CQ28E5zAM4v2aNWM9RCMms= =kOpB -----END PGP SIGNATURE-----
Sep 02 2009
"Denis Koroskin" <2korden gmail.com> wrote in message news:h7hbe8$1sni$1 digitalmars.com...I was refactoring the following line of code: foo(rand() % 256); -> foo(0); and that causes Optlink to crash now. Any reason why it does so? That particular file is just 157 lines long, but the whole project is quite big, although there are no large files. The biggest one is ~140K, it's from win32 bindings project (only defines a bunch of constants, and does little impact on output file size), that I use for a few years now, and they never caused any problem to me. My files are 40K max. I believe that line of code has no direct relation to Optlink crash, but I still post it just to show that it's code simplification that leads to crash, not adding any new type or symbol or anything. Thanks for any hint.I don't mean to sound patronizing, but you did try clearing out all the object files and doing a clean build, right? I only point it out because I've been bit a few times by an object file that got out of date but didn't get rebuilt (especially when using rebuild and switching to a different configuration, like debug vs release...and I've been suspecting that templates might have a tendency to trigger the same problem too). It took me awhile to catch on to the fact that this was happening.
Sep 02 2009