Slashdot Mirror


"Side By Side Assemblies" Bring DLL Hell 2.0

neutrino38 writes "This is an alert for all developers using Microsoft Visual Studio 2005. At the beginning of January, Microsoft issued a security fix for Visual Studio 2005 forcing the use of new dynamic libraries (DLLs) by all applications compiled with this IDE. Basically, applications compiled with Visual Studio 2005 will not work anymore on an ordinary (non-dev) PC unless the newer DLLs are installed. And we found out that this is true on fully updated PCs. I just posted some details and some suggested fixes." Read below for some more background on Microsoft's so-called "side by side assemblies."

For those unfamiliar with the Microsoft world, native microsoft applications written in C++ rely on dynamic libraries. Two of them are infamous: MSVCRT.DLL and MFCxx.dll. Because of software evolution and security fixes, multiple versions of these DLLs were often present in the system, causing application instability. Where Linux implemented a simple suffix notation on the dynamic libraries, Microsoft created a new beast in 2001: the Side By Side assembly. These are basically DLLs with a companion XML file that identifies them. The XML file contains a digital signature and when the system binds these DLLs dynamically to an application, it checks that the signature of the DLL matches the DLL itself. When everythings runs well, this is pretty transparent. But when issues arise, it becomes excruciatingly difficult to troubleshoot and fix. DLL hell is not over.

433 comments

  1. Oh the beauty of fixing what was already working by csueiras · · Score: 2, Insightful

    Microsoft FTL.

  2. And by all developers you mean by liquiddark · · Score: 1

    This is C++-only, right? Cuz I develop .NET code all day in VS2005, and it works very happily on all sorts of messed up machine configurations.

    1. Re:And by all developers you mean by Anonymous Coward · · Score: 1, Insightful

      Guess what .NET VM is written in.

    2. Re:And by all developers you mean by Anonymous Coward · · Score: 5, Funny

      Java?

    3. Re:And by all developers you mean by Anonymous Coward · · Score: 0

      No. There is just no way this will have an effect on .NET applications. If anything they will make an update for the .NET framework. As with previous Service Packs for the framework you won't see any negative effects with that.

    4. Re:And by all developers you mean by Tony+Hoyle · · Score: 1

      Which version of .net? Which build of that version? No good trying to run code written on .NET 3.5 on .NET 2 for example.

      Same with other elements like DirectX.

      If your installer doesn't make sure that the right version (or later, if applicable) is installed you'll get exactly the same problems.

    5. Re:And by all developers you mean by Anonymous Coward · · Score: 0

      Visual Studio 2005 can only work with version 2.

    6. Re:And by all developers you mean by Anonymous Coward · · Score: 1, Interesting

      .NET 3.5 uses the 2.0 CLR. If you don't use LINQ or WPF or a few other features, then your code will run on 2.0. Also, Visual Studio can target whatever version you want.

    7. Re:And by all developers you mean by freak132 · · Score: 3, Funny
    8. Re:And by all developers you mean by nstlgc · · Score: 2, Insightful

      If your installer doesn't make sure that is the case, you're an idiot, cause that's what installers are for.

      --
      I'm Rocco. I'm the +5 Funny man.
    9. Re:And by all developers you mean by Entrope · · Score: 5, Interesting

      This can bite you in a lot of conditions. One of the canonical examples is memory allocation. For example, foo.dll allocates memory and passes the pointer to bar.exe. To operate safely, bar.exe has to pass the pointer back to foo.dll so it can be freed. Otherwise, foo.dll might be using -- say -- malloc() and free() from one version of the C runtime library, and bar.exe might be using malloc() and free() from a different version. Because the different DLLs will end up allocating from different arenas, you'll corrupt both if you malloc() using one and free() using the other.

      There's a reasonable argument that passing memory ownership without providing allocation functions is a bad way to design libraries. Unfortunately, some interface standards specify bindings that forbid providing that kind of deallocation function in the DLL. (I'm looking at you, CCSDS SLE! I still haven't forgiven you for inflicting this form of DLL hell upon me so many years ago.)

    10. Re:And by all developers you mean by Anonymous Coward · · Score: 0

      And why do you think this is an apropriate response to the GP?

    11. Re:And by all developers you mean by gbjbaanb · · Score: 2, Informative

      This particular issue is C++ only, but that's simply because MS has screwed the way things used to work for unmanaged binaries.

      You may still get this issue next time MS issues a patched version of any of the .NET libraries, imagine that your code will only run on .NET 3.5 SP1 patch 1234, then you'll see the exact same problem. I guess we're all used to installing all manner of .NET framework libs through WU so no-one sees this issue so far, but its only a matter of time.

      Of course, if binaries used the previous version if the later one was not installed, things would be ok, but that's not the way they're doing things now.

    12. Re:And by all developers you mean by I+cant+believe+its+n · · Score: 4, Funny

      Blood?

      --
      She made the willows dance
    13. Re:And by all developers you mean by Anonymous Coward · · Score: 5, Informative
      I'm not sure what the authors of these posts were trying to accomplish, but there's some serious misinformation here. I've written a bunch of C++ apps on Windows using Visual Studio 2005, none of which rely on MFCxx.dll - that's only required when your application uses the MFC libraries. Also, the need for the redistributables for the C++ runtime has been around for a lot longer than this patch released in January (plus, it is now October), not exactly "news". There's a reason the redistributables come with Visual Studio from the get go, they aren't there for show. New redistributables are required for each version of Visual Studio, and even for each service pack (the alternative is to statically compile the runtime into the application which many people do). The requirement isn't because of the implementation of side by side assemblies, it's because changes have occurred in the C++ runtime which are not binary compatible. If developers who use Visual Studio 2005 for commercial products still aren't aware of this and need this sensationalist story on Slashdot to warn them, they have bigger problems.

      But when issues arise, it becomes excruciatingly difficult to troubleshoot and fix.

      The version information is written in plain text in the manifest. The files have names based on the version information in the WinSxS folder. If you get the error and notice the files aren't there, its fairly trivial to troubleshoot and fix.

      I'm not a fan of side by side assemblies, I just hate to see issues like this blown out of proportion as it obscures some of the real issues that developers face when developing for Windows (such as just about every bug filed on Microsoft Connect being closed as "by design" instead of being worked on or at the very least closed as "can't fix, compatibility issues", for example).

    14. Re:And by all developers you mean by cheesybagel · · Score: 1

      I really hate this side by side assembly stuff. I remember the first time I made a C++ binary executable with VS 2005. It worked fine on my PC, so it must work fine on any other Windows PC I thought. Wrong! Turned out I needed to install those redistributables... It did not use to be like this and I know no other closed source platform which works in this inane way.

    15. Re:And by all developers you mean by interval1066 · · Score: 2, Informative

      Its as though any developer who doesn't work directly for Microsoft is an enemy of the state (Of Microsoft).

      --
      Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
    16. Re:And by all developers you mean by tie_guy_matt · · Score: 1

      I find that in VS c++ (2005, and 6.0,) if you allocate memory in a dll you must free it in the same dll or you get (a hard to track down) error while debugging and a program that can be flacky. This happens to me even when the dll's are compiled on the same computer, with the same compiler, at the same time (all in one project.) You would think you could free memory in one dll that was allocated in another but in my experience VS c++ just doesn't like it.

    17. Re:And by all developers you mean by Anonymous Coward · · Score: 1, Insightful

      Can you Brainfuck faggots stop bringing it up any time that a programming-related topic is discussed here?

      Yes, we already know about Brainfuck. Most of us have known about it for many years now. We don't need cockfools like you bringing it up so bloody often.

    18. Re:And by all developers you mean by gandhi_2 · · Score: 1

      I'm Rocco. I'm the +5 Funny man.

      Nice Boondock Saints ref. (:

    19. Re:And by all developers you mean by Anonymous Coward · · Score: 0

      Duh, this is C++, right? Cuz, duh, I'm to stupid to write in C++. I prefer moron-level languages like C# and Java. They make me so 'leet when I writes the codes. Also, duh, I can't spell because.

    20. Re:And by all developers you mean by drzhivago · · Score: 1

      This is C++-only, right? Cuz I develop .NET code all day in VS2005, and it works very happily on all sorts of messed up machine configurations.

      Yes, it only affects C++ projects. We've been fighting with this exact problem for the past couple weeks.

    21. Re:And by all developers you mean by ravenlock · · Score: 1

      VS 2008 can target 2.0, 3.0 and 3.5. The older versions are all married to the platform they shipped with.

    22. Re:And by all developers you mean by ta+bu+shi+da+yu · · Score: 1

      Come on, that was just a good excuse for you to swear, right?

      --
      XML is like violence. If it doesn't solve the problem, use more.
    23. Re:And by all developers you mean by shutdown+-p+now · · Score: 4, Informative

      You are 100% correct. The "problem" with those guys is that they did not even understand that they have to redistribute CRT DLL with their binaries even before the update. They got lucky there because on most systems, it is already there (I believe Vista has it out of the box, and probably some MS software will install it on XP - maybe even IE7/8?), so they got away with not distributing it. Now the update brought in a newer version of runtime, which of course the clients don't have, and they suddenly realize that they didn't distribute their dependencies properly. What does "DLL Hell" or side by side assemblies even have to do with it?

      And, if they find it so hard to comprehend the idea that they have to give users the DLLs they link against, they could always just compile CRT statically and be done with it.

    24. Re:And by all developers you mean by Twylite · · Score: 3, Insightful

      I really hate this /lib stuff. I remember the first time I make a C binary executable with GCC. It worked find on my Linux box, so it must work fine on any other Linux box I thought. Wrong! Turned out I needed to apt-get a whole bunch of libraries...

      Seriously, all you are saying is that you didn't understand that your compiler was linking to a bunch of libraries, some of which were distributed with the OS and others were your responsibility to distribute when you created the application's setup/install package.

      --
      i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
    25. Re:And by all developers you mean by petermgreen · · Score: 1

      I think the key point is that a security fix to visual studio changed the deployment needs of the apps built with it. At best that to mean a lot of head scratching as to why what used to work no longer does. At worst it could mean expensive missed deadlines or inadvertent deployment of broken code.

      And while windows devs usually use installers for initial deployment consider things like auto-update mechanisms that are going to have to be changed to deal with this issue.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    26. Re:And by all developers you mean by Anonymous Coward · · Score: 0

      Come on mods, have some decency. The only reason he posted it as a reply to the GP is that it was at the top. It is not a reply to the GP in any point. Could you please mod that down for that reason?

    27. Re:And by all developers you mean by gbjbaanb · · Score: 4, Insightful

      "It works fine for me" said the MS developer.

      I put it down the the decline of Microsoft, I've been working as a MS dev for the past 15+ years, and since Bill left (a coincidence, I feel) the company has started a steady decline - wasting their money on frippery, attempting to get a new growth market, screwing with established systems in place of selling new stuff, and generally trying desperately to get your money off you. At least in the past, they were also focussed on making good technical stuff too.

    28. Re:And by all developers you mean by cheesybagel · · Score: 1
      The only things my app uses are standard system libraries. The standards were defined over 20 years ago. Why do I need to constantly recompile my app and why do the subassemblies keep changing? It did not use to be like this before when I developed in the craptastic Visual Studio 6.0.

      In Linux I can redistribute the source and people can recompile it. Linux also usually keeps old versions of libc for backwards compatibility. This does not seem to be the case here...

    29. Re:And by all developers you mean by Rockoon · · Score: 4, Funny

      For those of you who do not know, the parent poster is talking about these topics:

      A) A programming language called Brainfuck.
      B) Homophobia.
      C) How long the parent has known about Brainfuck.

      It seems clear to me that there is a language called Brainfuck that everyone needs to be made aware of.

      --
      "His name was James Damore."
    30. Re:And by all developers you mean by CisJokey · · Score: 1

      Now you got the diff between Linux and Windows. Bravo! No windows user will ever recompile anything. So you have theese deployment problems, I you dont worry about your prereqs and dont update via Installer, its your problem as developer. Of course the implementation in windows could be better ;-)

    31. Re:And by all developers you mean by CarpetShark · · Score: 1

      Angry much?

    32. Re:And by all developers you mean by Anonymous Coward · · Score: 0

      Now now, no need to use names, you racist asshole...

    33. Re:And by all developers you mean by Anonymous Coward · · Score: 0

      What is so special about Brainfuck anyway?

      Yes, a Brainfuck program looks weird, but the language is so simple that any (somewhat competent) programmer can understand it completely after 5 minutes of research.

    34. Re:And by all developers you mean by beuges · · Score: 2, Informative

      That's not a Visual Studio C++ issue, it's the way Windows memory management works. No matter what IDE/compiler/CRT you use, memory allocated by one dll cannot be (reliably) freed by another. It has to be freed by the same dll that allocated it. I'm not 100% sure, but I think you might also run into the same issue if you unload the dll and reload it before freeing the memory.

    35. Re:And by all developers you mean by Anonymous Coward · · Score: 0

      Once Brainfuck faggots reach Haskell faggots' level, you can complain. Until then, help me burn some of the latter to stop the faggottry.

    36. Re:And by all developers you mean by hesaigo999ca · · Score: 1

      Both you and your parent post deserve much mods informative, which I don't have, but does me saying you should be modded count for something?

          : )

      "Don't Worry, ....Code Happy"

    37. Re:And by all developers you mean by mdwh2 · · Score: 2, Informative

      You could distribute source on Windows too.

    38. Re:And by all developers you mean by bluefoxlucid · · Score: 1

      C# and C++ are too hard, I need something like C to make sense of the program flow. I can't wrap my head around C# innards yet, haven't bothered to figure out wtf the virtual machine is doing; C++ is just a garbage language, Objective-C is far better but I don't typically use it.

    39. Re:And by all developers you mean by plague3106 · · Score: 1

      What does "DLL Hell" or side by side assemblies even have to do with it?

      Indeed. A stanard Windows DLL is not quite the same thing as an assembly, and as far as i know only assemblies have ever been "side by side." If you're doing plain old C++ on Windows, sxs doesn't enter into it, because side by side is a feature of the .net runtime.

    40. Re:And by all developers you mean by afidel · · Score: 1

      I ran into the exact same issue on Linux, when 2.4 came out the standard libc still had lots of 16bit UID calls internally so even though the kernel supported 32bit UID's and some applications did you had to have side by side libc's installed so you didn't break older applications. The 32bit compatible libc didn't ship with any distro at the time so we had to install it ourselves. This was necessary for us because we were using NIS+ and had more than 32k total accounts that had been created.

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
    41. Re:And by all developers you mean by shutdown+-p+now · · Score: 2, Informative

      Indeed. A stanard Windows DLL is not quite the same thing as an assembly, and as far as i know only assemblies have ever been "side by side." If you're doing plain old C++ on Windows, sxs doesn't enter into it, because side by side is a feature of the .net runtime.

      Sorry, but you're wrong here. Microsoft is using the term "assembly" to refer to both managed and native DLLs since XP was released (which is before the first version of .NET was even out). Specifically, when you write a manifest file for your binary - which is something that first appeared in XP - you use the <assembly> element as root.

      Also, SxS is quite specifically designed to work with native assemblies (for managed, GAC takes care of it).

      Here is the reference:

      Side-by-side (SxS) assemblies allow applications to specify which version of a system DLL or classic COM component to use, such as MDAC, MFS, MSVCRT, or MSXML.

      Of course this all still has very little relevance to TFA, as they'd have troubles either way, SxS or not. The only difference is that with SxS they get a clear error report - "This program requires DLL version X.Y.Z" - while without it, they'd just get random crashes (or worse yet, silent data corruption) because of broken ABI between two versions of the binary.

    42. Re:And by all developers you mean by Cassini2 · · Score: 4, Interesting

      That's not a Visual Studio C++ issue, it's the way Windows memory management works. No matter what IDE/compiler/CRT you use, memory allocated by one dll cannot be (reliably) freed by another. It has to be freed by the same dll that allocated it.

      If you use GlobalAlloc() to allocate the memory, then GlobalFree() always frees it. (I'm quoting from my nightmares here.)

      The problem happens in VC++. The new operator eventually calls malloc() which eventually calls GlobalAlloc(), through chains of function calls that are fairly non-obvious, unless you read the disassembly or the source. GlobalAlloc() is a based Windows function, so every DLL links to the same system DLLs. The new and malloc calls are in the Microsoft Visual C++ libraries. Those libraries are loaded on a per DLL/EXE basis. As such, different VC++ DLLs can link to different VC++ run-time libraries, containing identical (or nearly identical) new and malloc functions but with different data areas.

      Additionally, malloc() is optimized so it doesn't always call GlobalAlloc() whenever new memory is required. malloc() has it's own list of memory allocations, and that is where the problem is. A malloc() from one DLL with it's own data memory area knows nothing about another DLL's data memory area. As such, the free() call can't possibly succeed when the data was allocated in a different DLL.

      Unfortunately, the torture doesn't end there. There are only two ways around the problem. Firstly, you can never pass memory allocations across DLL boundaries. Unfortunately, for some applications this doesn't work, for example COM and ActiveX controls. Alternatively, you can create a new type of memory handler to handle inter-DLL memory allocations. Microsoft created the IMalloc API for this reason. However, it is impossible to make the IMalloc API work across all possible failure modes. Also, IMalloc is not used by default for either new, delete, malloc() or free(). As such, the IMalloc API does not completely solve the inter-DLL issues, and introduces new problems of its own.

      The IMalloc API is at the heart of COM, which is also at the heart of C#. Normally, C# might be a good language for soft real-time, long life systems. However, if any bug exists in any control using the IMalloc API, then all of the CLR can become unstable. As such, C# is the home of my biggest programming disaster ever. A program that is less reliable and runs thousands of times slower than the equivalent in C. In C/C++, some freedom exists to properly handle memory allocations, and data types are checked at compile time. In COM, it is almost impossible to understand all of the complexities of all of the memory allocations and data type conversions. As such, it is both easy to make mistakes with COM, and very difficult to work around them.

      ActiveX/COM/DLLs are the root source of many serious security and reliability issues inside Windows. Historically, reliability and security issues were at least traceable to an executable. Now, all bets are off. ActiveX is present in Windows Explorer, Office and Internet Explorer, making it very difficult to effectively lock down the system. As such, system requirements for "a solid application" on "Microsoft Windows" represent an oxymoron. The result of these contradictory requirements is the application separation. Big and small applications use web servers running embedded Operating Systems or Linux (printers, Google, Bing), and display the results on a web browser on Windows.

      In short, this bug is not a side effect of the Windows Memory Allocation API: GlobalAlloc() and GlobalFree(). It is a side-effect of DLLs under Microsoft Windows, and importantly the C Run-Time Library DLL implementation. As a result of the attempted workarounds, it has probably had as big of an effect on Windows as the old Intel 8088 segmented memory architecture.

    43. Re:And by all developers you mean by Tetsujin · · Score: 1

      Come on, that was just a good excuse for you to swear, right?

      I don't fucking know what the fucking shit you're fucking talking the fuck about. Do any of you other fuckers know what kind of fucked up shit this guy is talking a-fucking-bout? 'Cause I don't fucking know, myself.

      --
      Bow-ties are cool.
    44. Re:And by all developers you mean by Bigjeff5 · · Score: 1

      For some reason I read that with a Canadian accent, and it was hilarious.

      --
      Security is mostly a superstition... Avoiding danger is no safer in the long run than outright exposure. - Helen Keller
    45. Re:And by all developers you mean by plague3106 · · Score: 1

      Hmm, never heard of that before. Anytime anyone has talked assemblies which I've seen, its always been in reference to .Net. Of course, .Net was released only months after XP itself was.

    46. Re:And by all developers you mean by Anonymous Coward · · Score: 0

      Previously they were compiling against build 762 of the CRT, which is distributed with Windows XP. This also means that their copy of Studio was very out of date, as build 3053 came with Visual Studio 2005 SP1 (released several years ago). Build 4053 was pushed out to Visual Studio users in August via a windows update, but not to anyone else.

      Yes, it would have helped if Microsoft had pushed out the updated version to all users but it isn't necessary. If you read the Studio documentation, if you link to CRT you are required to either distribute into your app's installed folder, distribute vcredist.exe with your installer, or (the best, and easiest option) bundle the supplied mergemodules into your installation.

    47. Re:And by all developers you mean by QuoteMstr · · Score: 1

      The problem happens in VC++. The new operator eventually calls malloc() which eventually calls GlobalAlloc(), through chains of function calls that are fairly non-obvious, unless you read the disassembly or the source. GlobalAlloc()

      I see. It seems like one way out for Microsoft would be to make one more revision to the CRT's malloc/free machinery, and have it *directly* calls GlobalAlloc and GlobalFree, then put the optimizations that used to be in malloc() into GlobalAlloc, the latest version of which is automatically used by all applications.

    48. Re:And by all developers you mean by BenoitRen · · Score: 0, Offtopic

      Please don't abuse the apostrophe. "it's" = "it is". You've used "it's" twice where "its" should have been used.

    49. Re:And by all developers you mean by Anonymous Coward · · Score: 0

      Not necessarily. C++ programmers really should learn how the free store (or "heap") works with their tools/platform of choice.

      In VC++ you can allocate memory with one DLL and free it in another DLL (and the EXE) if and only if you conform to a simple restriction: every DLL involved (and the EXE if it's involved) in cross-boundary memory (de-)allocation must be compiled & linked dynamically against the same version of the VC++ runtime. If your DLLs are statically linked, each one will manage its own heap; if one is statically linked while another is dynamically linked, they'll still use different heaps. If they're dynamically linked against different VC++ runtimes, including being built by different versions of VC++ or by the same version of VC++ on different systems having different VC++ runtimes, they'll (probably) be using different heap managers, thus (probably) different heaps.

      The situation with CodeGear (formerly Borland) Delphi and C++ tools is essentially the same (on Windows; no idea how Kylix handled this).

      There is a secondary concern, which C++ programmers should know about anyway: The results of mismatching new/delete with malloc/free are undefined, although it may work just fine with some compilers. An implementation is allowed to use distinct free stores for the C-style functions and the C++ functions. It's very naughty to allocate with new and de-allocate with free - and it's entirely reasonable for maintenance programmers to throw the offender into an active volcano when they discover such atrocities.

      As others have noted, statically linking everything into a monolithic EXE avoids all of this, when feasible.

      - T

    50. Re:And by all developers you mean by zemoo · · Score: 1

      A clean XP machine doesn't have the 2005 CRT on it. Apps need to carry the CRT if they're going to depend on it, same as always; the deployment needs haven't changed.
      It's just that the needs may have been mostly hidden by implicitly relying on other products to be installed on the machine that carry the CRT themselves.
      Since the pool of software linking against this new version is still fairly small, relying on an install from another piece of software is a bad bet.

    51. Re:And by all developers you mean by jgrahn · · Score: 1

      This is C++-only, right? Cuz I develop .NET code all day in VS2005, and it works very happily on all sorts of messed up machine configurations.

      Surely it applies to C as well, or don't Microsoft-people use that language? By the way, neither .NET or VS2005 is the name of a programming language, as far as I can tell.

    52. Re:And by all developers you mean by liquiddark · · Score: 1

      If you can't infer the principle languages from that context, you can't answer my question, and therefore don't belong in the conversation.

    53. Re:And by all developers you mean by dkf · · Score: 1

      It seems like one way out for Microsoft would be to make one more revision to the CRT's malloc/free machinery, and have it *directly* calls GlobalAlloc and GlobalFree, then put the optimizations that used to be in malloc() into GlobalAlloc, the latest version of which is automatically used by all applications.

      Not really. Memory management code typically works in two stages, using a coarse and fairly slow allocator provided by the OS (GlobalAlloc and GlobalFree in this case) that will provide new pages to the fine-grained allocator (what malloc et al provides an interface to) which does small block reuse and the like so turning a slow coarse thing into a much faster fine-grained thing. It is a good thing that stuff works this way, because OSes really shouldn't have to operate at the fine-grained level (doing context switches for every tiny object allocation would suck mightily) but it does mean that you have these memory management arenas hanging around in user space.

      On all Unixes, there's (usually[*]) one memory allocator and it works pretty well. On Windows... they've got a problem. (If only they'd factored out the memory manager into a separate system DLL that is only ever updated rarely and not redistributed, this problem would have never happened...)

      [* Some apps do use custom stuff that external code needs to care about. If they do, they expose an interface to let the third-party code deal with things sanely. ]

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    54. Re:And by all developers you mean by petermgreen · · Score: 1

      the deployment needs haven't changed.
      They have changed in a couple of ways

      1: if my app has always been written with 2005 previously I only needed to deploy the CRT on initial install, now I need to deploy it on updates as well.
      2: I need to ensure that my installer build system uses the new version of the crt, not the version it was using before.

      I still maintain that security updates should not introduce silent breakage like this.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  3. Also... by SigILL · · Score: 4, Informative

    What might be interesting to note here is that the summary isn't everything there is to side-by-side (SxS) assemblies.

    Suppose you're building an application using two DLLs, let's call them A and B. Both depend on a third DLL named C. Now, suppose A uses C version X, and B uses C version Y. You're screwed, right? Not with SxS, since that allows multiple versions of C to be loaded. That's the real added value of SxS.

    All this is in theory of course, which as we all know is in theory equal to practice, but in practice is not...

    --
    Error: password can't contain reverse spelling of ancient Chinese emperor
    1. Re:Also... by Anonymous Coward · · Score: 0

      Bullshit. The real problem is C version Y not being backward compatible to C version X, leading to this idiocy of piling more and more complexity on top of a totally rotten mechanism.

    2. Re:Also... by Anonymous Coward · · Score: 0

      And when the two versions of C are in fact functionally identical (except for few bug fixes in the later versions), as is usually the case, you're just wasting memory.

    3. Re:Also... by SigILL · · Score: 5, Informative

      The real problem is C version Y not being backward compatible to C version X, leading to this idiocy of piling more and more complexity on top of a totally rotten mechanism.

      It might surprise you, but Microsoft isn't actually to blame here. Rather, the legions of incompetent programmers that wrote DLLs such as C are to blame. We'd call them idiots, but Microsoft calls them paying customers. Thus prompting them to design SxS and incorporate it in WinXP.

      Also, SxS is what made the restyling of the UI (through common controls version 6) technically possible.

      Microsoft takes backwards compatibility very seriously.

      --
      Error: password can't contain reverse spelling of ancient Chinese emperor
    4. Re:Also... by thetoadwarrior · · Score: 1

      MS shouldn't really be allowing such poor practices. Why should my memory be eaten up by loads of DLL files that are nearly identical. Let's face it, there isn't going to be huge differences between version X and Y.

    5. Re:Also... by mwvdlee · · Score: 4, Insightful

      You do understand that DLL Hell exists exactly because version X and Y DO have huge differences?

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    6. Re:Also... by Anonymous Coward · · Score: 0

      Uh, unless the incompetent programmers you speak of work for Microsoft, WinSxS doesn't apply. The DLL has to be designed to use and install into the WinSxS mechanism, and so far as I can tell only Microsoft is using it for non-.NET DLLs.

    7. Re:Also... by Anonymous Coward · · Score: 0

      "this idiocy of piling more and more complexity on top of a totally rotten mechanism"

      That's exactly why, in the real world, we sometimes choose to make C version Y not backwards compatible with C version X. It lets us get rid of the cruft. You understand that, right, paco?

    8. Re:Also... by SigILL · · Score: 1

      MS shouldn't really be allowing such poor practices.

      What are you proposing exactly, have them automatically analyse all code that is being released (and solve the halting problem at the same time)? And how would you propose they deal with the ensuing shitstorm? There are actually legitimate reasons for DLLs changing you know, like the common controls I mentioned.

      Besides, what would you rather have, a program not working in its entirety, or working properly and using a meg more memory (that'd be a huge DLL; the code segment of most DLLs is barely half that)?

      --
      Error: password can't contain reverse spelling of ancient Chinese emperor
    9. Re:Also... by Anonymous Coward · · Score: 0

      Ha, what they do with OSGi packages in Java. Parts of your application can use different versions of the same basic library.

    10. Re:Also... by SigILL · · Score: 1

      The DLL has to be designed to use and install into the WinSxS mechanism

      Oh, yeah, you're right, sorry. Somehow the myriad SxS calls I've seen littering the MFC source must've slipped my mind.

      --
      Error: password can't contain reverse spelling of ancient Chinese emperor
    11. Re:Also... by Anonymous Coward · · Score: 3, Interesting

      .NET's strong requirements mean it no longer matters if "foo.dll version 1.5" breaks backwards compatibility with "foo.dll version 1.4", because the developer has the option to say at compile time "ONLY use foo.dll version 1.4". Consider this from the perspective of the end user, the application developer, and the dll vendor.

      The dll vendor is happy, because they can release new versions into the wild on their own schedule. Win.

      The application developer may or may not have been aware that the vendor released a new version of the dll. Fortunately the new DLL can't break the old code, so all regression testing that passed on the dev machine will pass on every end user machine, provided the end user didn't delete the original dll. Typically the the application developer has a license to redistribute the vendor's dll with the application; in that case running the setup application will restore perfect functionality. Win.

      The end user wants things to just work. Some "advanced" end users may know that the dll vendor released a new version that fixes some frustrating bug in the application, so they pressure the developer to release a new version of the application. Meanwhile, nothing broke. Win.

      Win. Win. Win.

      The only downside is that "advanced" users can't fuck with the application and try to make it use the wrong DLL. I see that as an added bonus.

    12. Re:Also... by Anonymous Coward · · Score: 0

      If they do, then they should be different DLLs entirely, not just different versions with the same filename. Like wsock32.dll and ws2_32.dll.

    13. Re:Also... by QuoteMstr · · Score: 2, Informative

      The only downside is that "advanced" users can't fuck with the application and try to make it use the wrong DLL. I see that as an added bonus.

      The rest of your post makes sense (though Unix-style versioning can do the same thing), but this point is wrong. Don't fool yourself or anyone else into thinking you can't modify any application regardless of this stuff. Of course you can: all the SxS stuff might do is make it a touch more difficult.

    14. Re:Also... by x2A · · Score: 1

      "Why should my memory be eaten up by loads of DLL files..."

      It doesn't have to be... just don't install any software that comes with more dll files than you want to have loaded. Simple.

      It's an available feature, it's not mandatory. No one's forcing you do to anything here.

      --
      The revolution will not be televised... but it will have a page on Wikipedia
    15. Re:Also... by x2A · · Score: 1

      "The only downside is that "advanced" users can't fuck with the application and try to make it use the wrong DLL"

      There's always .local dll redirection I assume?

      --
      The revolution will not be televised... but it will have a page on Wikipedia
    16. Re:Also... by x2A · · Score: 1

      If it released the bugfixed version as a new SxS version, and if your software is saying to only load the buggy version and now allow newer versions, and you haven't updated the software that loads the buggy version, sure.

      As soon as one of those conditions changes, then no.

      --
      The revolution will not be televised... but it will have a page on Wikipedia
    17. Re:Also... by Entrope · · Score: 4, Interesting

      The real problem is C version Y not being backward compatible to C version X, leading to this idiocy of piling more and more complexity on top of a totally rotten mechanism.

      It might surprise you, but Microsoft isn't actually to blame here. Rather, the legions of incompetent programmers that wrote DLLs such as C are to blame. We'd call them idiots, but Microsoft calls them paying customers. Thus prompting them to design SxS and incorporate it in WinXP.

      Also, SxS is what made the restyling of the UI (through common controls version 6) technically possible.

      Microsoft takes backwards compatibility very seriously.

      They don't take it seriously. They don't even try for DLL compatibility within a product release. Can you really say with a straight face that you can new using MSVCR70.DLL and delete using MSVCR40.DLL, and get away with it? What about MSVCR80D.DLL and MSVCR80.DLL?

      I'd bet dollars to donuts (adjusted for inflation) that the majority of problems caused by that incompatibility are due to Microsoft's C and C++ runtime libraries and their tendency to allocate memory from different arenas. My coworkers and I mostly program for Linux, but those few who have spent much time coding on Windows see that variant cause problems more often than practically anything else. How often you see third-party libraries cause DLL hell (that is, libraries not written by the application author) where those libraries are written by someone other than Microsoft?

    18. Re:Also... by jc42 · · Score: 3, Interesting

      Suppose you're building an application using two DLLs, let's call them A and B. Both depend on a third DLL named C. Now, suppose A uses C version X, and B uses C version Y. You're screwed, right? Not with SxS, since that allows multiple versions of C to be loaded. That's the real added value of SxS.

      Huh? Microsoft's compilers and linkers have allowed this for ages. The difference is that it's now a feature, not a bug.

      There was a study of MS's binary apps years ago (and I thought it was reported here, but I don't seem to find it in the archive), which analyzed the contents of the binary files. It was found that there were typically many copies of various library routines, sometimes 10 or more copies. They even had duplicated local data blocks. This was presented as a bug at the time, and an explanation of why MS's binaries required so much memory.

      But now this practice is called "side-by-side", and it's considered a feature. Which, of course, means that it never will be fixed, and users can look forward to even more bloated programs that contain copies of all the versions of a routine that have ever been released.

      It's sorta like extending the concept of a CMS into the binaries of apps. No longer will all those old versions be kept on the sidelines, off in obscure libraries. They will all be right there in the binary, ready to be loaded into memory if they are ever needed.

      Who was it that has congratulated the software industry for consistently undoing all the amazing hardware advances of the past decades by responding to bigger memories and faster processors by making the software use more memory and cpu cycles? SxS is a major step forward in this technique, and promises to lead to major increases in memory sales in the near future. And all it took was realizing that a practice that had been considered sloppy wastefulness of memory was actually a valuable new feature for backwards compatibility.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    19. Re:Also... by Anonymous Coward · · Score: 0

      "The only downside is that "advanced" users can't fuck with the application and try to make it use the wrong DLL"

      There's always .local dll redirection I assume?

      Or just hex editing the DLL's filename in the EXE to make it load an entirely different DLL...

    20. Re:Also... by Anonymous Coward · · Score: 0

      In linux, each library can have a suffix representing a major revision. If something is changed that would cause incompatibility with current programs, the major revision is changed, as well as the suffix; for example from libxxx.so.0 to libxxx.so.1.

      Programmers keep the minor changes from breaking older programs, and major changes can be made any time using this system. This doesn't allow multiple version of the library to be loaded at once, but it's damn simple, and relatively easy to fix problems even if not very user friendly for your mom: 'apt-get install libsomelibrary-1'. Most problems are handled by the package manager so it's rare to get such an error. (like windows installers)

      What's wrong with naming dll files with their major revisions, and then requiring the installers to check that all libraries of your required revision are new enough that they all depend on the same sub-libraries? The only time that won't work, is when dlls are no longer being updated by the vendor. It looks like it rarely non-microsoft libs that cause these issues anyway.

      It also seem like MS could search it's own repository for a particular dll needed, and prompt the user to install the latest version, instead of just reporting an error.

    21. Re:Also... by Anonymous Coward · · Score: 0

      Microsoft takes backwards compatibility very seriously.

      Do they support DOS, Win16, and older-than-vista drivers in Windows 7? These were all written for MS platforms. On another note, I can't really seem to get WinG applications to work properly, and programs designed to expect a certain Windows version fail instead of going into compatibility mode. How are they fixing this?

    22. Re:Also... by lysergic.acid · · Score: 1

      Is that another way of saying, "I can program however the hell I want. If you don't like it, don't run it?"

      That may fly if you're some hobbyist programmer deflecting user criticism regarding free software you donate your time to develop. But that kind of argument has no place in a discussion about sound programming practices. Otherwise, you're basically saying that there's no such thing as a bad program, since a user can just choose to not install it (though in many cases the end-user doesn't actually have this choice).

    23. Re:Also... by Anonymous Coward · · Score: 0

      Now, suppose A uses C version X, and B uses C version Y. You're screwed, right? Not with SxS, since that allows multiple versions of C to be loaded. That's the real added value of SxS.

      Anyone who wants to do that, is just a fool looking for problems.

    24. Re:Also... by shentino · · Score: 1

      I'd like to know why in the hell two different programs can wind up using two different versions of a DLL on a regular basis...

      Can't programs check the versions of the libraries they're using and at least be a little bit flexible?

      If programs are going to nitpick about versions they might as well just be statically linked in the first place.

    25. Re:Also... by ZorbaTHut · · Score: 1

      The problem is that not all programmers are perfect, and not all programmers are even very good. Sometimes you get a minor revision of a library which turns out to have unexpectedly major differences. And boom.

      Microsoft is trying to solve the problem, not shunt the problem only people who have already proven incapable of solving it.

      --
      Breaking Into the Industry - A development log about starting a game studio.
    26. Re:Also... by Anonymous Coward · · Score: 0

      Oh, surely you jest! Developing macros in Office has always been a hit-or-miss proposition. Many times I have been forced to tell a customer that they must all be rewritten because Microsoft changed it all! Often as not, they disbelieved me and hired someone else.

      As for Visual C++; don't write anything for a production environment in any of Microsoft's tools. It won't compile in the next version. In fact, you will be stuck with what I always heard as a solution for APL; make sure the comments are good enough to rewrite and then just rewrite whatever the code was in the "new" version of C++ from Microsoft.

      Don't even get me started with VB: you can't include the runtime with it because of M$ restrictions; runtimes from one version don't work with the old stuff and they rewrite the API every version!

      Microsoft takes backwards compatibility very seriously. Really, where the hell have you been for the last 20 years?

    27. Re:Also... by Blakey+Rat · · Score: 1, Insightful

      And yet Office still boots twice as fast as OpenOffice on a typical computer, IIS and MS SQL are completely neck-and-neck with their competitors, and Outlook completely trounces its closest competitor, performance-wise.

      I mean, I completely understand what you're saying: having multiple copies of the same function/code block in memory is inefficient. But in practice, it doesn't seem to be hurting them anyway.

    28. Re:Also... by Niten · · Score: 5, Insightful

      MS shouldn't really be allowing such poor practices. Why should my memory be eaten up by loads of DLL files that are nearly identical. Let's face it, there isn't going to be huge differences between version X and Y.

      Versions X and Y of a DLL will be flat-out incompatible if that DLL is written in C++ and the author has changed the number of attributes in an interface class (unless he uses tricks such as pimpl), or if he's added or removed any virtual functions.

      And the fact that Microsoft is so good at preserving application backward compatibility, even in the face of "poor practices", is frankly one of the main reasons that Windows is the #1 business desktop operating system in the world.

    29. Re:Also... by glebd · · Score: 1

      Microsoft takes backwards compatibility very seriously.

      Yes, Microsoft takes backwards compatibility and pushes it to the level of ridiculous idiocy when they patch the OS and keep the old bugs in order to get some ancient application to run on the newest version of Windows. Because you can't really expect your customers to upgrade their apps, or the incompetent third-party programmers to get their act together, right? Don't believe me? Just read The Old New Thing blog by Raymond Chen.

    30. Re:Also... by Anonymous Coward · · Score: 0

      Sounds like programming may not be for you. I have no problem compiling code I wrote for the Microsoft's first 32-bit C compilers.

    31. Re:Also... by Exception+Duck · · Score: 2, Informative

      Mod parent up.

      This is the real world out there described above.

    32. Re:Also... by jc42 · · Score: 1

      Yeah, just as with the ancient technique of the "finger on the scale", or padding various products (especially food) with small amounts of extra junk. It's perfectly natural for sellers to hoodwink customers in such ways, and if the customers are dumb enough to fall for it, they deserve what they get, right?

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    33. Re:Also... by ClosedSource · · Score: 1

      If you want to discuss "sound programming practices" than by all means begin.

      Perhaps you could start with explaining how the optimizing feature of dlls outweigh the risks of coupling unrelated applications in light of the significant memory and disk resources that are available in modern computer systems.

    34. Re:Also... by Anonymous Coward · · Score: 0

      "The only downside is that "advanced" users can't fuck with the application and try to make it use the wrong DLL"

      There's always .local dll redirection I assume?

      Not unless you have the signing key for the DLL or the executable.

    35. Re:Also... by zentechno · · Score: 1

      So, this means they've clung to their dynamic library model to the point where they've invented a system to identify unique versions of these DLLs so each application can load multiple copies of the same DLL -- and *somehow* this is better than just using static linking? How, in practice (that is "in the real world) doesn't this completely marginalize the benefit of dynamic linking -- *especially* since they insist on using huge "dynamic" libraries? Fanatics, for sure.

      --
      âoeThe wall between art and engineering exists only in our minds.â -- Theo Jansen
    36. Re:Also... by terjeber · · Score: 2, Informative

      Because you can't really expect your customers to upgrade their apps,

      No, you can't. Really. Remember, the vast majority of business software, in sales and in number of titles, is proprietary software written in-house or by some consulting dude. A significant portion of this software is mission-critical and replacing it is mostly nor practical (cost) or it is impossible since the original author and often the source code, is long gone/dead etc.

      Backwards compatibility is a huge issue for business apps, and Microsoft has been doing a phenomenal job of it. Not that this stops the whiners from whining.

    37. Re:Also... by ravenlock · · Score: 1

      I'm pretty sure assembly binding redirection doesn't require you to have the signing key. :)

    38. Re:Also... by TheLink · · Score: 1

      Well his point is the MS stuff is about as fast if not faster than their competitors.

      So are the OpenOffice people hoodwinking their users with extra junk too?

      And compare Windows Live Messenger with Pidgin. Pidgin crashes/hangs regularly and is slow.

      --
    39. Re:Also... by ShakaUVM · · Score: 3, Informative

      >>Microsoft takes backwards compatibility very seriously.

      They always say this, and then fairly fundamental programs always seem to break during one of their OS upgrades. Like my very expensive copy of MATLAB. Won't run on Vista. Period. And the code we've licensed won't run on more modern versions of MATLAB. And it's impossible to find high end visualization laptops these days with XP on them.

      And yeah, I am a little bitter about it.

    40. Re:Also... by shutdown+-p+now · · Score: 1

      Bullshit. The real problem is C version Y not being backward compatible to C version X, leading to this idiocy of piling more and more complexity on top of a totally rotten mechanism.

      Right, which is of course why Linux doesn't have any way to version .so files... er... or does it. Wonder what "totally rotten mechanism" (do you mean dynamic/shared libraries there? or can you meaningfully explain how /usr/lib is any different from C:\WINDOWS\SYSTEM32?) that is supposed to pile upon...

    41. Re:Also... by asliarun · · Score: 0, Offtopic

      I digress from the topic under discussion, but you should buy a Nehalem processor laptop (Core i7), install VMPlayer, and run XP as a VM. Alternately, you can wait a few days for Windows 7, which has XP compatibility mode built-in (also running as a VM). The reason why I specifically say Nehalem is because the VM optimization is dramatically better than Core2Duo, and speed-wise, you might still see a performance increase even though you're running your code in a VM. The newer AMD processors are quite good at VMs as well, and in fact, Nehalem only catches up to AMD in VM performance. However, Nehalem will give you a definite edge in terms of int and float number crunching performance.

      Please also make sure that your hard-disk is not bottle-necking you. Get an SSD if you can afford it, or at least go for a 7200rpm drive.

    42. Re:Also... by Twylite · · Score: 1

      No, the real problem is that A and B have been developed and released with workarounds for an undocumented behaviour in C, which is later decided to be a bug and corrected. C version Y is obviously not backward bug compatible to C version X, causing the upgrade to break A and B.

      --
      i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
    43. Re:Also... by Twylite · · Score: 1, Troll

      WTF? Why do you think that you should be able to allocate resources in one subsystem and free them using another? Every dynamic library on any platform can have its own heap management routines. Your stupidity is laughable -- try placing the blame where the incompetence lies.

      --
      i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
    44. Re:Also... by DangerFace · · Score: 2, Interesting

      Office still boots twice as fast as OpenOffice on a typical computer ... in practice, it doesn't seem to be hurting them anyway.

      I have to disagree - OpenOffice on my Linux partition boots faster than Office on my Windows partition on the same computer. The problem is when MS gimp Windows to hell - they know the workarounds, so Office runs OK. OpenOffice just have to use trial and error and a whole lot of guesswork to rid themselves of bugs that only exist to give MS an advantage. I completely understand that the average Joe Sixpack doesn't care, but that's why MS is still managing to sell gimped OSs.

    45. Re:Also... by Anonymous Coward · · Score: 0

      Sounds like those programs are arbitrary.

    46. Re:Also... by Anonymous Coward · · Score: 0

      And it's impossible to find high end visualization laptops these days with XP on them.
      Can you specify your requirements for a "high end visualization laptop" so we can verify this claim? Looking at the top end dell precision laptop "M6400 Covet" XP certainly seems to be an option.

    47. Re:Also... by Anonymous Coward · · Score: 0

      How did "...one of the main reasons..." become "...the sole reason..." under your bridge?

    48. Re:Also... by drsmithy · · Score: 2, Informative

      Who was it that has congratulated the software industry for consistently undoing all the amazing hardware advances of the past decades by responding to bigger memories and faster processors by making the software use more memory and cpu cycles?

      That would be all the people for whom software is a tool, not intellectual masturbation. The people who consider "how soon can you deliver", "how much will it cost" and "how long can you maintain it" substantially more important than "will it run on my 10 year old computer".

      SxS is a major step forward in this technique, and promises to lead to major increases in memory sales in the near future. And all it took was realizing that a practice that had been considered sloppy wastefulness of memory was actually a valuable new feature for backwards compatibility.

      For the vast majority of people, backwards compatibility is far, far more useful than saving a dollar's worth of RAM and CPU cycles.

    49. Re:Also... by Anonymous Coward · · Score: 0

      I haven't had pidgin crash on me in ages, and the last I saw of WLM it looked like someone from kindergarden had designed and drawn its interface. That was a while ago though, but seriously, all proprietary chat clients I have ever seen (iChat perhaps excluded) are overburdened with fugly icons and/or ads everywhere. Pidgin, despite a lack of some of the really nice features, is at least usable without you getting a mental coredump from just looking at the interface.

      On a related note, what the f**k are Microsoft's interface designers smoking? Everything they've ever put out, except perhaps Office 2007 and the black version of the taskbar in Vista, looks like some kid who've just learned photoshop did it. Aesthetics is completely missing. Nothing is visually pleasing. I mean look at XP, using green, blue and red, with everything oversized and bloated? And the new taskbar in Windows 7, what is that colour? Baby blue? Horrendous! However usable those interfaces may be they have the taste and visual appeal of feces.

    50. Re:Also... by bytesex · · Score: 1

      Where are we with the multi-version file-systems ? It seems to me that this, along with many other niceties could be resolved using a file-system that can contain multiples of the same file (we have GUIs these days anyway to differentiate) or multiple versions, or both.

      --
      Religion is what happens when nature strikes and groupthink goes wrong.
    51. Re:Also... by jceaser · · Score: 1

      Didn't the EU take them to court for that?

    52. Re:Also... by bluefoxlucid · · Score: 1

      I miss my 486 with Windows 95 and 16MB RAM and 200MB disk space... it was so much faster than my dual core 2.0GHz with 4GB of RAM and a terabyte of disk space. Peppy, responsive, ran 3D games like Quake 1 ... and Win98 oh man 32MB was great but I had 64, it rocked, and a 200MHz pentium, running Quake 2.... Computers these days are so slow and you need massive amounts of hardware to get anywhere. They can do some batch shit like encode MP3s now, but they're not useful for general purpose work anymore.

    53. Re:Also... by Blakey+Rat · · Score: 1

      Live Messenger might be drawn by kindergartners, but at least it works with voice recognition and tablet input and has a normal Open dialog. Pidgin's UI looks like it was designed by some alien being who was only described the Windows UI over a bad cellphone connection.

    54. Re:Also... by Blakey+Rat · · Score: 1, Insightful

      The problem is when MS gimp Windows to hell - they know the workarounds, so Office runs OK.

      Oh come on! You can't just say stuff like that without providing any evidence. Do you have any? At all?

      It seems to be that Windows performance, in general, is at worst on-par with the competition. Even Vista, if your computer meets the hardware specs. Now you're telling me that the only reason OpenOffice runs slow is because all of Windows is "gimped", and Office contains some kind of cheat code that "un-gimps" it? Seriously?

    55. Re:Also... by Entrope · · Score: 1

      I come from the land of Linux, where malloc() and free() are the same functions no matter which DLL in a process's address space calls them -- and if the ABI for one happens to change for whatever reason, the C library takes care to provide backwards compatibility wrappers. As a result, most shared libraries use the C heap management routines.

      Even by your mindset of "subsystems", malloc() and free() are part of the subsystem known as the standard C library, so memory allocation should work better than it does under Windows. Calling me names doesn't change that Microsoft continues to hose up their C runtime libraries.

      I have also worked with standards that require some functions return pointers that are to be deallocated by calling free(). I am inclined to agree that a library would be unwise to promise that something can be deallocated with free(), but I wasn't the one making that decision.

      (I won't even get started on C++: The frequent changes to ABI under Linux make life harder than it should have to be, but at least if your executable links -- statically or dynamically -- you're not likely to have new/delete resolution problems. Under Windows, DLLs have to provide replacements for delete or use COM objects instead of C++ objects.)

    56. Re:Also... by plague3106 · · Score: 0, Troll

      Or, perhaps the OO people are just hacks that can't be bothered to learn how to do things properly on windows. Everytime I see an open source app "ported" to Windows, it turns to crap. Yet many apps written for windows from the get go (and I'm talking 3rd party stuff) seems to work just fine.

    57. Re:Also... by I_Wrote_This · · Score: 0

      Versions X and Y of a DLL will be flat-out incompatible if that DLL is written in C++ and the author has changed the number of attributes in an interface class ....

      Why would any developer do that? Why not create a new class with the added bits, and make the old class use the new one, passing in default values for the additions. That is backwards compatibility.

      And the fact that Microsoft is so good at preserving application backward compatibility

      Not for 3rd-party application code (which is nothing to do with them), but for the Windows OS code used by applications. And, from what I've heard, a lot of the "difficulties" here have been because Microsoft has lots of undocumented calls (so that MS products can do things that others "can't") which then non-MS applications start to use in other ways. If MS did have a fully-documented OS interface there might be fewer "poor practices". So it's self-inflicted, I fear.

    58. Re:Also... by plague3106 · · Score: 1

      I've never heard sxs described like that. From what I understand, it can load different versions if available, but usually the first one loaded "wins." Oh, even if that's not the case, I would expect the "second" copy wouldn't be loaded until actually needed.

      I know this is how it is in .Net by the way. Assemblies are loaded only on demand. Once they are loaded, a second attempt to load another assembly with the same name but different version will cause an error. I've had this come up a few times when assembly A wanted 1.2 of assembly C, but assembly B was built against version 1.1 of C. Depending on whther I used a function from A or B first, it would get the version it wanted loaded, but trying to use the other one would result in a FileLoadException.

    59. Re:Also... by afidel · · Score: 1

      For the kind of money you would have had to spend to get 64MB in a 486 you could buy a computer today with an SSD RAID10 array, 16GB+ of memory, the best graphics card you care to find, etc. RAM back then was a little over $100/MB by the end of the 486 erra so you're talking $8k+ for the PC. The fact is you can get a peppier PC today for a fraction of the cost, people are just used to buying cheap low-end PC's and living with the "slowness".

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
    60. Re:Also... by Anonymous Coward · · Score: 0

      How does crap like this get modded +5? Your post is filled with so much rhetoric that the facts that are there are completely hidden.

    61. Re:Also... by Bigjeff5 · · Score: 1

      The system libraries can and do change, usually not often, but they do over time. That is completely out of the developer's control.

      What MS has done is instead of having 20 different virtually identical .dlls with different names (which would mean thousands more .dll files to store for compatibility), they put all the .dlls of a particular type into one file, and give an XML that allows the program to access the correct version.

      --
      Security is mostly a superstition... Avoiding danger is no safer in the long run than outright exposure. - Helen Keller
    62. Re:Also... by StuartHankins · · Score: 1

      I'm not Googling it for you, but I remember much debate during the Microsoft antitrust trials when Microsoft was found to be sharing people/code/documentation between their core OS team and the Office development team. There were documented examples of Windows features that Office enjoyed because they had access to this secret code. The practice was found to be unfair for competitors.

      I'm not sure that there were necessarily tricks to make other software not function -- not aware of any "DOS isn't done until Lotus won't run" or whatever -- but I certainly wouldn't put it past Microsoft, given their hideous track record in this area.

    63. Re:Also... by Goyuix · · Score: 1

      So I am just curious, is there something that is missing from Octave that makes it a viable replacement for MATLAB for you? Particularly if you are lagging a few versions behind?

      This is the perfect example of "free" in FOSS. You aren't tied to a specific platform or endless* required upgrades.

      *This is an approximation for very small values of forever.

    64. Re:Also... by BenoitRen · · Score: 1

      I was not aware that continual hardware upgrades now cost one dollar. A US dollar, at that.

      It's not about intellectual masturbation. Far from it. What an insult. It's about efficiency over sloppiness.

    65. Re:Also... by drsmithy · · Score: 1

      I was not aware that continual hardware upgrades now cost one dollar. A US dollar, at that.

      When you already have the hardware anyway - as most people do - then the difference in utilisation usually is that small.

      It's not about intellectual masturbation. Far from it. What an insult. It's about efficiency over sloppiness.

      But what measure of efficiency ? You are concentrating on trying to use as little hardware power as possible, which - given it's typically the cheapest aspect of any system - is rarely the best use of resources. Most people are far more interested in being "efficient" by having a product sooner, or making it easier to debug, or increasing its capabilities, or making it scale well, than they are about making it run on the slowest hardware possible, because all those things are a more efficient use of time and money.

    66. Re:Also... by zemoo · · Score: 1

      Multiple processes loading the same version of a side-by-side library can still share codepages. In practice there's only a few versions of each library.

      Secondly, and more importantly, static linking means that if any library your program is using is found to be vulnerable, you must ship a new version of your program. With dynamic linking, the library can be updated separately.

      In fact, this is one of the big use-cases of side-by-side: it comes with a policy redirection mechanism for servicing. Library authors can say "version X was vulnerable, so all apps using version X must use version X.1 which fixes the vulnerability", even if version X is only privately installed in the application's folder.

    67. Re:Also... by Anonymous Coward · · Score: 0

      What might be interesting to note here is that the summary isn't everything there is to side-by-side (SxS) assemblies.

      SxS - Sucks? Someone tell me this is a mistake. Or is this Microsoft naming (like WinCE) that actually makes sense....

    68. Re:Also... by ysth · · Score: 1

      Microsoft takes backwards compatibility very seriously.

      How seriously? 1.#INF seriously.

    69. Re:Also... by bluefoxlucid · · Score: 1

      yes but this was 64MB in a 200MHz 586, it only cost like $100 ... Win95 barely cared for more than 8MB.

    70. Re:Also... by Anonymous Coward · · Score: 0

      When we read phrases like, "Microsoft takes backwards compatibility very seriously." we must constantly remind ourselves that it's referring to Microsoft's glossary of terms, not those used by the rest of the world. That is, Microsoft takes backward compatibility very seriously (as a critical method for ensuring that the world remains on their upgrade treadmill.)

    71. Re:Also... by BenoitRen · · Score: 1

      You are concentrating on trying to use as little hardware power as possible, which - given it's typically the cheapest aspect of any system - is rarely the best use of resources.

      Software that is efficient runs faster for everyone, making for a better product. It also increases the target group of customers as more people can run it.

      Seeing as how often people have complained about Firefox' RAM usage and speed, JavaScript's speed, and Flash's speed, I'd argue that performance does matter, and that upgrading continually is not the desired solution.

      Do you really think it makes sense to have a program using more resources in the next version for doing the same things? It happens a lot.

    72. Re:Also... by jc42 · · Score: 1

      Hmmm ... Some readers seem to have missed the point that it was (quite consciously) written in the form of a fawning news report copied from a corporate press release. So of course it's full of rhetoric that hides the fact. That's what Marketing does, y'know.

      --
      Those who do study history are doomed to stand helplessly by while everyone else repeats it.
    73. Re:Also... by techprophet · · Score: 1

      No, it's the #1 because it's cheap and well-supported. Most shops still run Windows XP.

    74. Re:Also... by drsmithy · · Score: 1

      Software that is efficient runs faster for everyone, making for a better product.

      That it runs faster isn't much use if it hits the market too late to be useful.

      It also increases the target group of customers as more people can run it.

      Not in any meaningful sense. Again, hardware computer is far and away the cheapest aspect of any computing infrastructure. The idea that an economically meaningful number of customers won't buy your software because of its hardware requirements (outside of edge cases) is just unrealistic.

      Seeing as how often people have complained about Firefox' RAM usage and speed, JavaScript's speed, and Flash's speed, I'd argue that performance does matter, and that upgrading continually is not the desired solution.

      Everyone complains. It's what people do. Now ask those people if they're rather have it at the current performance, or not available for another year, and see what they say.

      Do you really think it makes sense to have a program using more resources in the next version for doing the same things? It happens a lot.

      Examples ?

    75. Re:Also... by BenoitRen · · Score: 1

      That it runs faster isn't much use if it hits the market too late to be useful.

      What is "too late"? Would at most a couple months be too late? If so, your product must not have had much value in the first place.

      Again, hardware computer is far and away the cheapest aspect of any computing infrastructure.

      Tell that to companies who need a lot of computers. Having to buy many new(er) computers still accounts for a lot of money.

      Now ask those people if they're rather have it at the current performance, or not available for another year, and see what they say.

      Alternatives exist, so they just switch to those, which would imply they'd rather have waited. Of course, it's not that easy for everyone, as some people depend on Firefox extensions.

      Examples ?

      Microsoft Office? IntelliJ? Visual Studio 200x?

    76. Re:Also... by drsmithy · · Score: 1

      What is "too late"? Would at most a couple months be too late? If so, your product must not have had much value in the first place.

      "Too late" would be when your potential customers have gone off and bought the software from the other vendor who isn't so concerned that his software needs 2Ghz and 1GB vs 1.5Ghz and 512MB to run. Because once they've already got a tool in place, you need a hell of a lot more persuasion than "20% faster" to get them to switch.

      Tell that to companies who need a lot of computers. Having to buy many new(er) computers still accounts for a lot of money.

      "Companies who need a lot of computers" work on a 3-4 year cycle, 5 at the most. Your "efficiency" argument is more relevant to computers in the 7-10 year old timeframe.

      Microsoft Office? IntelliJ? Visual Studio 200x?

      Office is most certainly doing more with each version. You might not be using or appreciating it, but that doesn't mean it isn't there. I can't speak for the other two programs, but I would guess they are the same.

    77. Re:Also... by BenoitRen · · Score: 1

      Office is most certainly doing more with each version. You might not be using or appreciating it, but that doesn't mean it isn't there. I can't speak for the other two programs, but I would guess they are the same.

      If I'm not using and appreciating it, the program should not suddenly be half as fast as the previous version. This should be obvious.

    78. Re:Also... by x2A · · Score: 1

      "Is that another way of saying, "I can program however the hell I want. If you don't like it, don't run it?""

      Is that another way of saying "I should be able to run everything written under the sun, if you don't like how I want you to write software, don't write it"?

      See I can do that too :-)

      --
      The revolution will not be televised... but it will have a page on Wikipedia
  4. Speaking as a user by Anonymous Coward · · Score: 5, Insightful

    Speaking as a user, can we get statically linked libraries? I don't care if it's dependency hell or DLL hell. I want self-contained applications.

    1. Re:Speaking as a user by Darkness404 · · Score: 3, Informative

      All that is just great until you realize that each application may be -huge-. If someone can make a small script that converts OGG files into MP3 files using both the OGG encoder and MP3 encoder that is already on my system, it saves me from downloading ~20 MB of extra files.

      --
      Taxation is legalized theft, no more, no less.
    2. Re:Speaking as a user by Timothy+Brownawell · · Score: 5, Informative

      That's great until some common library needs to be updated for a security hole, and you have download 20 updates from different vendors (assuming they even provide updates...) rather than 1 item in Windows Update.

    3. Re:Speaking as a user by Anonymous Coward · · Score: 0

      There's absolutely no good reason, why two programs that use the exact same library, can't share that library. Take a Gnome desktop app for example. Pretty much every Gnome application will use a few standard libraries, such as GTK+ and glib. They aren't THAT big, but do we really want all that code loaded for each and every application that needs them? Memory usage would go through the roof.

    4. Re:Speaking as a user by moon3 · · Score: 1

      self-contained applications

      TFA problem is easily resolved by statically linking the stuff. And the thing you pointed up is the Achiles heel of pretty much any *NIX system where the app dependencies are often much more widespread and the app itself is not self-contained, but rather disseminated over the whole system.

    5. Re:Speaking as a user by WarwickRyan · · Score: 2, Informative

      But the other side is that the OS is massive.

      c:\windows alone is 11gb, with \winsxs being around 6gb.

      Googling shows that \winsxs is where all these dll versions are being stored.

      I haven't got close to 11gb of applications installed (and I've got VS, SQL server + office on here).

    6. Re:Speaking as a user by Tony+Hoyle · · Score: 4, Insightful

      If they were statically linked you'd have way more than 11gb of applications..

    7. Re:Speaking as a user by QuoteMstr · · Score: 4, Insightful

      But the other side is that the OS is massive.

      It'd be more massive if everything were statically linked.

      Remember, shared libraries didn't come first. The world began with static libraries, and shared libraries came later. There were good reasons for the switch, and those reasons apply even today.

    8. Re:Speaking as a user by lilo_booter · · Score: 2, Informative

      Totally agreed - and additionally, the rigid static linking doesn't work in a plugin environment where each plugin (which is in itself a shared library/dll) brings in its own (shared) dependencies based on the users requirements. Apologies to the OP, but users really shouldn't make demands at this level - there are many reasons why developers and packagers prefer dynamic loading, and likewise it's *their* responsibility to get it right such that users aren't even aware of this level of detail.

    9. Re:Speaking as a user by calmofthestorm · · Score: 2, Informative

      Also keep in mind you're looking at a huge RAM footprint as well, since multiple copies of the same library will be loaded per-application, whereas sometimes you can make optimizations for libraries shared across applications with paging magic.

      That said, I thought that OS X apps were statically linked (except with OS libs), and thus tend to be large, but reduce this issue since so much functionality is based on system libs. I could be wrong; I don't really ever work with non-linux systems.

      --
      93rd rule of Slashdot: No matter how obvious my sarcasm is, my comment will be taken seriously by someone.
    10. Re:Speaking as a user by MioTheGreat · · Score: 3, Interesting

      No. Winsxs is not 6gb. That's just explorer being stupid when it tells you how big it is. There are a lot of hard links in there.

    11. Re:Speaking as a user by Anonymous Coward · · Score: 0

      No, they use something called frameworks. I also stick to the linux side of things, but frameworks are definitely the equivalent to dynamic libraries (I believe the equivalent would be to package the so, header, + docs into 1 file).

      Very few people do static linking today.

    12. Re:Speaking as a user by seneces · · Score: 2, Informative

      Applications can statically link the CRT with /MT or /MTd instead of the (default) /MD and /MDd. It's pretty common, and i've found that the actual increase to binary size is very small. It often cuts down on distribution size anyway, since that allows /OPT:REF (eliminate unreferenced code) to take effect. It'd be nice if the CRT was available on all systems by default and we didn't have to worry about it, but failing that, static linking is a *necessity* for anything that doesn't use a full installer.

    13. Re:Speaking as a user by Anonymous Coward · · Score: 0

      Except the problem with that is that you end up with insecure applications. I'm shocked that the linked article's solution is "Remove the security fix KB971090". I wonder how his customers will react when that's suggested. The complaint that applications won't work unless the new DLLs are installed is pathetic - anyone with the old DLLs will have them updated by Windows Update, and distributing them is just a matter of rebuilding the installer with the new runtime distribution - which is not an onerous task. The comment that this is "Not very convenient" shows they've been too damned lazy to write a proper installer anyway. Added bonus, it's easily possible to write your applications to use the latest version of the DLL, no matter what that is.

      Frankly I'd take the bitching of anyone that says users should uninstall a security patch because they're too lazy to write an installer with a *huge* pinch of salt.

    14. Re:Speaking as a user by QuoteMstr · · Score: 1

      Why would you need to statically link your libc in order to eliminate unreferenced symbols in your own program? GNU ld can do that without having to link statically. You might be saying that thanks to unreferenced symbol elimination, linking libc isn't that onerous, and you might be right. But your program should never be smaller after static linking.

    15. Re:Speaking as a user by zippthorne · · Score: 1

      Except that now gnome desktop manager needs something in a library provided by the Evolution package, and you're stuck downloading and installing a half-gig email client because you want to run GIMP.

      Static linking might very well be worth it in these days of improperly re-factored libraries. Or stuff should be severable. Or the libraries should be sanely provide with in the correct packages.

      --
      Can you be Even More Awesome?!
    16. Re:Speaking as a user by QuoteMstr · · Score: 2, Informative

      Or the libraries should be sanely provide with in the correct packages.

      Just like in the physical world, bad packaging can fuck up an otherwise good product.

      Incidentally, on Fedora, the scenario you describe doesn't occur.

    17. Re:Speaking as a user by CodeBuster · · Score: 1

      Statically linked libraries are no panacea either. For example, suppose that a flaw is discovered in a version of a library which is statically linked into your app. Unless the app is re-compiled with the the newer fixed version of the library your app will continue to use the flawed version and remain vulnerable to whatever code might be injected and executed via the flaw.

    18. Re:Speaking as a user by Anonymous Coward · · Score: 0

      I think the suggestion was to remove KB971090 on the *developer's* system -- thus causing modules built on that system to refer to the SP1 version of the CRT again. Users can continue to have KB971090 installed -- it installs a policy in WinSxS to redirect references to the SP1 CRT version to the updated DLL.

    19. Re:Speaking as a user by omuls+are+tasty · · Score: 1

      It's not just the disk space, it's also the memory. With shared libraries, you only have to load the code into memory once.

    20. Re:Speaking as a user by YourExperiment · · Score: 2, Funny

      Any now you've wasted another 638 of my bytes storing the extra pixels in your bold text, you insensitive clod!

    21. Re:Speaking as a user by Anonymous Coward · · Score: 0

      Correct. I would like to add to that that DLL hell wasn't caused by the use of dynamically linked libraries as such. It was caused by developers who changed the interfaces to their DLLs under other people's noses, and the fact that Windows was set up so that applications and installers could replace DLLs by incompatible ones of their own creation. And to a lesser extent by applications that relied on undocumented behaviour of DLLs, that changed in a newer, legit, compatible (public API-wise) version of the DLL. DLL wasn't caused by DLLs but by lousy programmers.

    22. Re:Speaking as a user by mysidia · · Score: 1

      The advantage is you can fix the flaw by releasing a new build of the app against the new library.

      With SxS assemblies, your app keeps linking against the old version of the DLL which might never get the patch (?)

    23. Re:Speaking as a user by Anonymous Coward · · Score: 0

      Only one brand of computer can bring you close to that dream and has been doing so for over 20 years.

    24. Re:Speaking as a user by jma05 · · Score: 4, Insightful

      Dynamic linking is being used because static linking has been denied as a choice in most of the current dev tools that matter on Windows. In Delphi, I had a choice of static and dynamic linking. I always chose static linking. Most Delphi users did the same. I didn't have that choice with VB6, Java, and .NET.

      Static linking is not bad. When smart linking, only the used routines from the library are bundled along, not everything in the library. When I used dynamic linking, to simplify installation for the user, I had to also distribute the full DLLs along (they would not be installed if they already exist on the target machine), even when I used only a small portion of their functionality. Consequently, my installers were always SMALLER when using static linking.

      If you are developing in-house applications, this is less of a concern though since you can reasonably assume their presence on the target machines; and because you will be using the same dev tools consistently. Dynamic linking is only efficient when the involved DLLs are relatively unchanging and necessary by many apps. This also works well in Linux where a package manager with dependency tracking is an assumed part of the system. Dynamic linking has its advantages and disadvantages. But it is not a solution that uncritically deserves its current dominance.

    25. Re:Speaking as a user by x2A · · Score: 1

      Mine's 22Meg *lol*

      And Windows is 2.6Gig... ...but that's an nlited 2003, not Vista.

      --
      The revolution will not be televised... but it will have a page on Wikipedia
    26. Re:Speaking as a user by Anonymous Coward · · Score: 1, Informative

      and we see the static linked library virus hell, and how microsoft had to write whole-system-wide-scanners to find out if some app had statically linked some jpeg encoding lib that had a flaw in that could be used to attack a system.

      statically linked libraries are hell to patch.

    27. Re:Speaking as a user by internettoughguy · · Score: 1

      The point GP was making was that in the .\winsxs you have a situation where have a separate DLL for each app so as not to break compatibility, and this is definitely a situation where a static library would be superior.

    28. Re:Speaking as a user by Mongoose+Disciple · · Score: 1

      The advantage is you can fix the flaw by releasing a new build of the app against the new library.

      With SxS assemblies, your app keeps linking against the old version of the DLL which might never get the patch (?)

      Unless I'm completely misunderstanding what you're saying, that doesn't really bear out as an advantage -- someone using dynamic linking could (and probably would) equally release a new build of the app which links against the new version of the DLL.

    29. Re:Speaking as a user by QuoteMstr · · Score: 1

      The lesson? Writing good software is hard. There's no silver bullet.

    30. Re:Speaking as a user by Anonymous Coward · · Score: 0

      Really? I've been linking against MSVCRT.DLL (yes, the OS provided one) and never had a problem with it.

    31. Re:Speaking as a user by Twinbee · · Score: 1

      I don't have many important apps that access the internet like that anyway.

      I would much prefer self-contained apps, even at the slight cost of a memory/download increase.

      --
      Why OpalCalc is the best Windows calc
    32. Re:Speaking as a user by Anonymous Coward · · Score: 0

      Security holes in apps that don't access the internet can matter, too. For example, if MS Office has a security hole and your web browser is setup to view MS Office documents using the MS Office plug-in, then a malicious website could send you a document with the exploit. (Replace MS Office with another other application; I used MS Office specifically because it is an application that comes with a browser plug-in that I would not expect to have a browser plug-in.)

    33. Re:Speaking as a user by Anonymous Coward · · Score: 0

      Unlike on Linux, on Windows if building with Visual Studio you must ship the DLL containing the C runtime.

    34. Re:Speaking as a user by onefriedrice · · Score: 4, Informative

      That said, I thought that OS X apps were statically linked (except with OS libs), and thus tend to be large, but reduce this issue since so much functionality is based on system libs. I could be wrong.

      Yeah, you are wrong. Mac OS X apps are definitely dynamically linked (the equivalent of so on Mac OS X is dylib). The reason Mac OS X apps can be larger than executables on other platforms is because they often contain machine code for multiple platforms (ppc, x86, x86_64). That only translates to a large footprint in storage.

      Now you know.

      --
      This author takes full ownership and responsibility for the unpopular opinions outlined above.
    35. Re:Speaking as a user by BZ · · Score: 1

      It's not quite multiple copies of the same library, since static linking only links in the symbols you actually use, not everything in the library. RAM footprint can certainly increase as a result... or for a big library that a few people all use small pieces of might actually decrease.

    36. Re:Speaking as a user by tepples · · Score: 1

      But your program should never be smaller after static linking.

      An app with a static library can be smaller than the combination of the same app and a shared library if A. the library isn't one that many well-known apps use, B. the operating system lacks a concept of a central repository from which third-party shared libraries can be downloaded (e.g. Windows), or C. both. A isn't true of libc on Windows, but it could be true of SQLite or GNU libstdc++.

    37. Re:Speaking as a user by bonch · · Score: 1, Insightful

      If we're having to store different versions of libraries, the whole purpose of dynamic linking has already been defeated.

    38. Re:Speaking as a user by gbjbaanb · · Score: 1

      With SxS assemblies, your app keeps linking against the old version of the DLL which might never get the patch

      that's not the case. With this CRT/MFC/ATL patch, your app will not run at all unless the very latest patched libraries are present. You'll get an application configuration error before it even starts.

    39. Re:Speaking as a user by QuoteMstr · · Score: 2, Informative

      or for a big library that a few people all use small pieces of might actually decrease.

      You seem to be under the mistaken impression that if a library is dynamically linked, then the entire library must be loaded before any program can use a portion of the library. That's not true.

      Consider a library with symbols A, B, and C, with programs P and Q. Program P uses symbol A from the library, and program Q uses symbol B from the library.

      If these programs are statically linked and are run simultaneously, the memory image of P will be P+A, and the memory image of Q will be Q+B. The code for C will not be loaded because it's not linked into any program.

      If the programs are linked dynamically, then the memory image of P is still P+A, and likewise Q is still Q+B. Only the used portion of a library is paged in from disk.

    40. Re:Speaking as a user by QuoteMstr · · Score: 1

      That's simply not true. It might be good idea under some circumstances, but there's nothing stopping you from distributing an application linked against the system MSVCRT.DLL.

    41. Re:Speaking as a user by bonch · · Score: 1, Informative

      OS X uses frameworks, which can be installed in /Library/Frameworks or ~/Library/Frameworks. If an application wants to ship with its own framework, it will store it in the application bundle and link from there.

    42. Re:Speaking as a user by Anonymous Coward · · Score: 1, Funny

      good product

      Fedora

      ahahahahahaha... Oh God

    43. Re:Speaking as a user by PCM2 · · Score: 1

      Why talk about browser plug-ins? Microsoft Office is a suite of applications, each of which can open documents. If the suite makes use of a flawed library when opening documents, then every application in the suite is vulnerable until the library is patched. Anybody could e-mail you a document that's designed to exploit the flaw and you'd be hosed. As the GP said, in the shared-library model, the fix is to replace the flawed library with a version that patches the exploit, and instantly every application in the suite is fixed. In the statically-linked version, you'd need to download patches for every single application in Microsoft Office -- and potentially a lot of other apps on your system, too.

      --
      Breakfast served all day!
    44. Re:Speaking as a user by Guy+Harris · · Score: 1

      Speaking as a user, can we get statically linked libraries?

      Not if the library with which you're linking depends on another component that does not supply a stable ABI.

      For example, on Solaris and Mac OS X, the system call interface (the set of available system call traps, the arguments to those traps, and the sequence of such traps used to perform certain higher-level operations, such as "look up a host name") is *NOT* guaranteed to remain the same from release to release; the stable interfaces are the APIs in libraries such as libc/libSystem.

      Windows is the same. Windows OT (95, 98, Me) and Windows NT (3.x, 4.0, 2000, XP, Server 2003, Vista, Server 2008, 7, etc.) have very different implementations of the Win32 API/ABI, and the implementation might even change from release to release (consider that the GUI sat atop a server in NT 3.x and atop kernel graphics drivers in 4.0 and later).

      So if the vendor were to supply a statically-linkable version of the library, that would leave open the possibility of building an app that the vendor cannot guarantee will work the same on all releases. I don't know whether Sun decided to allow that, but Apple and, I think, Microsoft didn't (they probably didn't want to have to deal with whining from developers of apps such as that, and users of those apps, when the app failed to work on a new OS release).

    45. Re:Speaking as a user by Jeremi · · Score: 1

      That's great until some common library needs to be updated for a security hole, and you have download 20 updates from different vendors (assuming they even provide updates...) rather than 1 item in Windows Update.

      Sure, but doesn't SxS suffer from the same problem? i.e. you download the new/patched library version, but SxS still magically ensures that all your apps still use the old one that they were compiled against (you know, for compatibility).

      Or perhaps I am missing something here?

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    46. Re:Speaking as a user by Anonymous Coward · · Score: 0

      IMO, it should be decided on a per application basis. I wrote a program to download and install an application where I work and I staticically linked everything. ZLib, CURL, MFC42. I never want that thing to fail and it's memory footprint is *tiny*.

      There's a cost benefit that should be used for this one.

    47. Re:Speaking as a user by BZ · · Score: 1

      > Only the used portion of a library is paged in from disk.

      That very much depends on the exact dynamic library format and such, actually...

    48. Re:Speaking as a user by Timothy+Brownawell · · Score: 1

      That's great until some common library needs to be updated for a security hole, and you have download 20 updates from different vendors (assuming they even provide updates...) rather than 1 item in Windows Update.

      Sure, but doesn't SxS suffer from the same problem? i.e. you download the new/patched library version, but SxS still magically ensures that all your apps still use the old one that they were compiled against (you know, for compatibility).

      Or perhaps I am missing something here?

      Assembly (set of DLLs) versions can indicate (lack of) backwards compatibility. I would assume that this means an application looking for FooLib 1.2.3.5 would find FooLib 1.2.3.6 if that was installed, but not FooLib 1.2.3.4 or the FooLib 1.3.x.x that might also be installed. But this is just an assumption since I don't write Win32 programs and the immediately available documentation seems to be rather sparse, I guess it's entirely possible that Microsoft didn't do the sane thing here.

    49. Re:Speaking as a user by QuoteMstr · · Score: 1

      Name a modern operating system that always brings in entire shared libraries.

    50. Re:Speaking as a user by BZ · · Score: 1

      I won't speak to "entire", but last I checked (and perhaps this has changed), ELF was loaded segment-at-a-time, not function-at-a-time.

    51. Re:Speaking as a user by QuoteMstr · · Score: 1

      It could map the whole library, but that doesn't mean the library takes up RAM. The kernel pages in the library a page at a time. It doesn't even use any swap because the library pages are backed by the shared library file.

    52. Re:Speaking as a user by BZ · · Score: 1

      Ok, sure. At this point we're getting into definitions of what exactly constitutes "memory use", which is a notoriously difficult issue with modern OSes no matter what.

    53. Re:Speaking as a user by tsm_sf · · Score: 1

      The lesson? Writing good software is time consuming and boring.

      Fixed that for you.

      --
      Literalism isn't a form of humor, it's you being irritating.
    54. Re:Speaking as a user by webheaded · · Score: 1

      Is Dolphin retarded too? I'm looking at my Windows 7 "winsxs" folder in KDE's Dolphin and it says it's 5.5 GB.

      --
      "Those who would sacrifice essential liberties for a little temporary safety deserve neither liberty nor safety." - BenF
    55. Re:Speaking as a user by Anonymous Coward · · Score: 0

      Define "HUGE". I decided to avoid .DLLs (except those standard system APIs like USR32.DLL) using static linking only since cca 1998 for all of my apps and usually app size is about 2.5MB. IMO that is very little price to pay for avoiding DLL hell...

    56. Re:Speaking as a user by terjeber · · Score: 2, Insightful

      Static linking is not bad ... my installers were always SMALLER when using static

      How easy it is to show that you do not understand anything at all... who cares what size your installers are? If everybody followed the "I'll just statically link everything" the average Windows computer would need 32G of memory just to function (exaggerated to make a point).

      DLLs are good, but they have problems. Static linking is bad for anything slightly more advanced than a "Hello World" application.

    57. Re:Speaking as a user by terjeber · · Score: 1

      I am currently running Chrome. It opens pages in separate executables to limit problems to a specific tab or page. It is fast. It is quite reliable. If it was developed the way you are suggesting it would probably be able to open about five pages or tabs before your computer buckled under the weight of Chrome alone. OK, slight exaggeration to prove a point.

      Statically linking everything would be phenomenally stupid. DLLs exist for very good reasons, and their design at MS is not horrid. The main difference between the situation at MS and with something link Linux is that people have been consistent in using versioning in DLL (shared libraries) on various versions of Unix. The fact that MS mandates versioning is a good thing and developers need to adapt. Yes, DLL hell will still be an issue, but that is not because we have DLLs, it's because so many programmers out there are inept and incompetent. Including developers working for MS.

    58. Re:Speaking as a user by TheLink · · Score: 1

      In case you have memory problems, you said "RAM footprint".

      And I believe that's what he was addressing too.

      So are you on the same page now? ;)

      --
    59. Re:Speaking as a user by terjeber · · Score: 1

      TFA problem is easily resolved by statically linking the stuff.

      Which is about equivalent to using a shot gun to cure a tooth ache. Yes, your ache is gone, but so is your head.

    60. Re:Speaking as a user by goonerw · · Score: 1

      Is Dolphin retarded too? I'm looking at my Windows 7 "winsxs" folder in KDE's Dolphin and it says it's 5.5 GB.

      Yes because it's also counting the hard links.

      --
      LOAD ".SIG"
      PRESS PLAY ON TAPE
    61. Re:Speaking as a user by shutdown+-p+now · · Score: 1

      I didn't have that choice with VB6, Java, and .NET.

      Dunno about Java or VB6, but you can get static linking with .NET. For your own applications, you just compile all your projects to "netmodules", and then link them together into a single assembly using AL. Alternatively - for example, if you have a precompiled third-party assembly - you just use ILMerge.

      Yes, you cannot do that trick for .NET system libraries (not that the license would allow you to, anyway), but it's fairly normal to expect the user to have a corresponding VM/runtime installed.

    62. Re:Speaking as a user by shutdown+-p+now · · Score: 1

      Speaking as a user, can we get statically linked libraries? I don't care if it's dependency hell or DLL hell. I want self-contained applications.

      You can get statically linked CRT (C runtime), and frankly that's what you should get.

      You cannot get statically linked Win32 API libraries, but there's no reason to, because they're not run SxS, anyway. Unlike CRT, they don't have "debug" and "release" versions, and any updates are done on OS level, and back-compat requirements are much stricter (because it's OS API - remember that standard C library itself is not part of OS API on Windows the way it is on Unix, and you can code production Win32 apps in C without linking CRT in at all).

    63. Re:Speaking as a user by xtracto · · Score: 1

      That's great until some common library needs to be updated for a security hole, and you have download 20 updates from different vendors (assuming they even provide updates...) rather than 1 item in Windows Update.

      And then magically, the other 19 programs stop working because they are not compatible with the updated library.

      --
      Ubuntu is an African word meaning 'I can't configure Debian'
    64. Re:Speaking as a user by Anonymous Coward · · Score: 0

      I am quite fine with downloading large apps, if it takes 6 or 20 seconds does not matter that much to me anyway and should not to anyone with a decent pipe either. And disk space is not really qualifying for "considerable cost" nowadays. From the typical end-user point of view, I think that static linking is preferable in the majority of cases; "It simply works". Yes, it is not particularly elegant, but it works (and that is a feature whose value is vastly underestimated today).

    65. Re:Speaking as a user by Twylite · · Score: 2, Informative

      Not possible since MSVC6. Newer compilers link against newer version of MSVCRT that do not ship with the OS. So you must either link statically or distribute the MSVCR80/MSVCR90 runtime DLLs.

      --
      i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
    66. Re:Speaking as a user by PetriW · · Score: 2, Informative

      Try a real programming language, like C, C++, and other languages with machine-code compilers, not souped-up interpreters (not even souped up in VB's case.)

      Delphi does not produce interpreted code and it never has. It has produced native code since Delphi 1 and Turbo Pascal did the same before that.

      (Delphi.NET does though. ;))

    67. Re:Speaking as a user by moonbender · · Score: 1

      I think you misread GP. The increase to binary size is small due to OPT:REF and it reduces distribution size, since you only distribute your application plus those parts of the lib you need, instead of distributing your application plus the complete library. The dynamically linked distribution needs to contain both since you don't want to rely on the library being available on the system.

      That said, I think the security argument is pretty convincing. I'm sure there are still a lot of apps out there with a vulnerable, statically-linked libpng.

      --
      Switch back to Slashdot's D1 system.
    68. Re:Speaking as a user by moon3 · · Score: 1

      Today even massive 10MB binary is not much of a problem, most new users have half T disk and some GB of RAM. Static linking adds only about 2MB or to the executable, managers and people in general think bigger = better, more content there is the more valuable it must be, haha.

    69. Re:Speaking as a user by radtea · · Score: 1

      When I used dynamic linking, to simplify installation for the user, I had to also distribute the full DLLs along (they would not be installed if they already exist on the target machine), even when I used only a small portion of their functionality. Consequently, my installers were always SMALLER when using static linking.

      Thank you. One of the basic laws of programming is "no optimization without quantification", and the posters above who are claiming "but if you statically linked things would be big!" are not offering any actual data. The reality you describe is all too familiar: dynamically linked applications that ship with thier own private copy of the DLLs to ensure they don't step on the existing ones, and that depend on the bugs/features in those specific versions.

      To take an extreme example, I'm shipping an app right now that installs its own private JRE version because a third-party driver I'm stuck with requires that one specific (now ancient and unsupported) runtime or it leaks memory and dies on a regular basis (installing the private JRE on a specific relative path where the driver will find it is recommended by the manufacturer, who are hardware people and whose software support group is clearly staffed by drunken monkeys.)

      So the baseless claim that "dynamic linking makes it smaller" needs quantification: real world empirical data to back it up. Otherwise it is just hot air. And in a world where bandwidth is cheap and hard drives are huge, even if statically linked exe's are a bit bigger, I'm willing to pay that price to ensure that my users always get to run the code I ship, rather than some other code that happens to be on their machines.

      If used consistently the SxS stuff could have created a world where users could have multiple copies of common DLLs and we wouldn't have to worry about shipping private copies, but in the real world dynamic linking means that users wind up with dozens of copies of common DLLs sitting in different directories, just in case someone else steps on the copies in the standard path with new versions that they haven't tested against.

      Dynamic linking is an example of pre-mature optimization, and as such should be avoided unless there is a compelling quantitative reason for using it, and only then for non-critical systems, where the undefined behaviour that may result when new versions of libs are installed in the standard path doesn't matter.

      Remember: if you are installing private copies of common DLLs or using SxS to allow multiple public copies of common DLLs to cohabit nicely, you should be statically linking your code. Otherwise you installer is bigger than it needs to be because it contains whole DLLs are part of the redist package, rather than just the bits you need compiled into your app.

      --
      Blasphemy is a human right. Blasphemophobia kills.
    70. Re:Speaking as a user by radtea · · Score: 2, Insightful

      If everybody followed the "I'll just statically link everything" the average Windows computer would need 32G of memory just to function (exaggerated to make a point).

      Wanna provide some data for that claim? And any guesses as to the number of people who ship private versions of the DLLs they need to ensure their app behaves properly because it depends on bugs in that specific DLL version? In my experience that's a pretty common move for anything above a "Hello World" application.

      Also, a number of people the GP was responding to were making points about how long it would take to download stuff, so I hope you replied to them as well, pointing out what dummies they are.

      --
      Blasphemy is a human right. Blasphemophobia kills.
    71. Re:Speaking as a user by jceaser · · Score: 1

      I think windows developers need to do a better job of knowing when to use static libraries. Common OS stuff should be just fine to link dynamically against, but common, frequently updated third party DLL's should maybe be static. However I have to agree with you, to hell with the harddrive, just bundle it all up in one package, like the way Mac OS does it (and others).

    72. Re:Speaking as a user by Anonymous Coward · · Score: 0

      Verified actual size is something in the ~2gb+ range but explorer can't get it's head around hard links, MS could make a big marketing coup if they just fixed this one bug...

    73. Re:Speaking as a user by ThaReetLad · · Score: 1

      Not true. WinSXS makes heavy use of hard links, so a great many of the entries point to the same file, and many of those files actually exist in windows\system32. When explorer tries to add up the size of the folder it follows all these links and counts the files several times.

      --
      You can't win Darth. If you mod me down, I shall become more powerful than you could possibly imagine
    74. Re:Speaking as a user by QuoteMstr · · Score: 1

      Thanks. I knew there was a reason to stick with mingw32. Expecting programs to cart around their libc implementations is crazy.

    75. Re:Speaking as a user by afidel · · Score: 1

      Or the application install steps tell you to install redistributable package x.y.z from MS KB12345 if it's not already installed. I find that's probably about ~1/3rd of the software I install.

      --
      There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
    76. Re:Speaking as a user by jma05 · · Score: 1

      VB5 and VB6 compilers could either produce p-code or *native code* (as the developer wanted). The native code executables still needed the VB runtime; but the runtime was not interpreting, but rather just providing standard routines. This is similar to say... Scheme native compilers. Even VC++ needs msvcrt. The only difference with the later was that it was more pervasive.

      Your concept of *real* programming languages is rather amateur. I probably had some of those notions 15 years ago. After a couple of dozen languages or so, words like "real" loose their meaning because there are no convenient and passionate categories any more.

    77. Re:Speaking as a user by jma05 · · Score: 1

      > How easy it is to show that you do not understand anything at all

      And yet you show nothing more than hyperbolic exaggerations when I am talking about my *empirical* observations.

      > who cares what size your installers are?

      In Delphi days, software download sizes made or broke a shareware's success. In broadband era, download sizes are somewhat less important. But then you can extend the same argument to - computers are faster, RAM is cheaper and anything else.

      > average Windows computer would need 32G of memory just to function

      Why would you need more memory if apps are statically linked? When loading in-process DLLs, you still load multiple copies into memory, one into each application process. Things are different with out-process DLLs of course, but they are slower since marshaling needs to be done across process space. My statically linked apps took same or less memory space.

      And I specifically noted that there is an argument to be made in using dynamic loading for unchanging and common components, just not everything and anything. Your arguments are entirely based on reflexive pre-conceptions, not experience.

    78. Re:Speaking as a user by lennier · · Score: 1

      "I don't have many important apps that access the internet like that anyway."

      You sure?

      You don't use, for example, any of: Anything from Adobe (including Reader), anything from Apple (including Quicktime player), anything from Logitech (such as a webcam driver), anything from Real, anything from Google, anything from Blackberry, Microsoft Office, OpenOffice, any web browser, any antivirus?

      Because on my machine, all of the above ship with their own Internet-connected auto-updatey thingies. Even if you didn't ask them to. They're doing Net connections in the background and could potentially be exposed to security issues.

      --
      You are not a brain: http://books.google.com/books?id=2oV61CeDx-YC
    79. Re:Speaking as a user by lennier · · Score: 1

      "And then magically, the other 19 programs stop working because they are not compatible with the updated library."

      Good. The update's working as designed. Better they magically stop working than magically silently root your system, no?

      --
      You are not a brain: http://books.google.com/books?id=2oV61CeDx-YC
    80. Re:Speaking as a user by cmdotter · · Score: 1

      Although a security hole would exist, it would exist inside the application itself, meaning that in order to gain access to the system, one needs to then attack that program first. Furthermore, the application may not even use the feature of that is part of the library.

      Many security holes can 'disappear' when statically linked, simply because the linker removes unused code, unlike a dll. Also the application may have some extra checks in their code that ensures that 'bad things' don't necessarily occur when a call is made to an 'unsafe' function (eg strcpy()).

      In short, statically linking:
      ~ forces attackers to attack a particular program (and not a suite of programs that use a dll)
      ~ may reduce the attack footprint because the linker removes unused code

    81. Re:Speaking as a user by Anonymous Coward · · Score: 0

      Why would you need more memory if apps are statically linked? When loading in-process DLLs, you still load multiple copies into memory, one into each application process.

      Windows generally doesn't reload the code segments of the same DLL, but rather maps the already loaded code into the new process's address space. Of course, modifiable data segments are re-loaded per-process. OTOH, with static linking, a decent linker will remove unused object code, so the size of library code/data added to the executable can be much smaller than the size of the analogous DLL, leading to your small app footprint.

      Things are different with out-process DLLs of course, but they are slower since marshaling needs to be done across process space.

      What do you mean by "out-process DLLs"? DLLs are always in-process, by definition (on Windows, at least). AFAIK, the only way a DLL can be loaded out-of-process is to be loaded by some other process (even if it's just RunDll32.exe), but that kind of interaction is really no different than any other IPC.

      - T

    82. Re:Speaking as a user by Tony-A · · Score: 1

      Including the ability to make further updates.

      The situation is precisely that the system was vulnerable, somethings have been fixed, maybe, the system is still vulnerable, only we do not know what/where/when. You might catch a disease or something. Better to die quickly.

    83. Re:Speaking as a user by xtracto · · Score: 1

      The update's working as designed. Better they magically stop working

      LOL How's that new basement lamp?

      I can see it now, "yes boss, our Amazon.com portal stopped working because we updated the libc library to the last version to patch a security issue; and our Apache server stopped working because it is not compatible with it... what? clients? who cares? better the page to stop working and receiving orders than having a potential possible risk of maybe someone trying to r00tz0r us."

      Ahh, that was a nice trip.

      --
      Ubuntu is an African word meaning 'I can't configure Debian'
  5. Why don't apps just use their own copy of the .dll by bit+trollent · · Score: 2, Interesting

    Instead of referencing the .dll in \Windows\System\ why don't you reference a copy of the .dll in \Program Files\Your Stupid App\ ?

    Seems like a simple fix to me, though I'll admit most of my .dll experience comes from the asp.net/c# world.

  6. Source Engine by Lord_Jeremy · · Score: 1

    Gah! I'm wondering how this is going to affect the source engine. I'm not sure if Valve has migrated their codebase over to a newer version of Visual Studio, but the current versions of the public SDK still use Visual Studio 2005. Hopefully I'll still be able to tool around with my Source mods without too much trouble. As I recall it is possible to use the SDK source code with newer Visual Studio versions, yet you have to jump through some hoops to upgrade the project files.

    I was really pissed when I discovered that Microsoft had discontinued all versions of Visual Studio Express under the most recent one (2008, I believe?). I had to go and get a copy of VSE2005 off of bittorent since you could no longer download it from the Microsoft web site.

    1. Re:Source Engine by SigILL · · Score: 1

      the current versions of the public SDK still use Visual Studio 2005

      For most projects, upgrading sources from VS2005 to VS2008 is really quite painless, no harder than opening the .SLN in 2008 and letting it save the converted result. Are the Source sources really that problematic?

      --
      Error: password can't contain reverse spelling of ancient Chinese emperor
    2. Re:Source Engine by AndrewNeo · · Score: 1

      Upgrading projects is not equal to the change in the compliers. Here's the guide on getting the Source SDK working in VS2008: Compiling under VS2008.
      Actually, upgrading from 2003 to 2005 was far worse, as it required changes to individual files. Fortunately Valve cleaned most of these problems up, making 2005 to 2008 easier.

    3. Re:Source Engine by Lord_Jeremy · · Score: 1

      Admittedly I haven't tried doing the conversion recently, but in the past one would have to solve a large number of compilation issues related to compiler bugs and newer versions of libraries. Looking at the developer wiki article about compiling under 2008, this process seems easier than it used to be, but it's still extra unnecessary steps.

    4. Re:Source Engine by Anonymous Coward · · Score: 0

      A two second search on the Microsoft site brings up the fact that no, they have not discontinued the express versions of Visual Studio! All they appear to have done is removed the links from the part of the site that markets the full version and given express its own distinct area...

      http://www.microsoft.com/express/

    5. Re:Source Engine by Xest · · Score: 2, Insightful

      "I was really pissed when I discovered that Microsoft had discontinued all versions of Visual Studio Express under the most recent one (2008, I believe?). I had to go and get a copy of VSE2005 off of bittorent since you could no longer download it from the Microsoft web site."

      Then you got pissed and used BitTorrent for absolutely no reason whatsoever, because Microsoft are touting Visual Studio Express more than ever nowadays, it's become a core product for them.

      http://www.microsoft.com/express/

      What gave you the impression they'd discontinued them? Even on the standard Visual Studio pages links to express are and always have been clearly visible.

    6. Re:Source Engine by Lord_Jeremy · · Score: 1

      No I didn't mean they discontinued VSE entirely, I meant they discontinued all the versions older than 2008.

  7. .NET internals by NoYob · · Score: 3, Interesting
    I don't know. Let's say you're developing in C# or VB and you make calls to a library that is really a bunch of C++ classes and methods with a C# or VB wrappers. Then, I'd assume, you would indeed have this problem.

    Someone with knowledge of .NET internals care to comment?

    --
    It's NOT me! It's the meds! I'm on 1000mg of Fukitol.
    1. Re:.NET internals by Anonymous Coward · · Score: 1, Funny
      Someone with knowledge of .NET internals care to comment?

      No.

      They're all too busy drooling on the cupcakes at their Windows 7 launch parties.

    2. Re:.NET internals by rdnetto · · Score: 1

      Yep, that pretty much sums it up. It's pretty rare to do interop with anything other than the Windows libraries though, unless you've got some legacy code in place.

      --
      Most human behaviour can be explained in terms of identity.
    3. Re:.NET internals by shutdown+-p+now · · Score: 3, Insightful

      Frankly speaking, any sane person compiling C++ code for Windows will just statically link the standard library, rendering this a non-issue.

    4. Re:.NET internals by Skizmo · · Score: 4, Funny

      That's a contradiction. Sane people wouldn't write software for windows, rendering this a non-issue.

    5. Re:.NET internals by MadKeithV · · Score: 1

      Sane people wouldn't write software.
      It's a good thing for the rest of us that some of us aren't sane.

    6. Re:.NET internals by zemoo · · Score: 1

      Of course, if you do that, your application is vulnerable when bugs are discovered in the library.

  8. Re:Why don't apps just use their own copy of the . by Anonymous Coward · · Score: 5, Informative

    That defeats the whole purpose of a DLL anyway. The thought was that you wouldn't have to "reinvent the wheel" and you could reuse code. However, Microsoft's failure to document their operating system's API thoroughly in a public manner led to developers relying on undocumented features that were later changed. Then, those applications needed older versions of those libraries and would install them over the newer versions. This, of course, crashed the newer applications. Ugh.

  9. Non-issue for actual msdn coders like myself by Anonymous Coward · · Score: 1, Interesting

    But I always get a chuckle out of the clueless non-coders of slashdot tackling such discussions.

    Lol @ all the calls for statically linked libraries (yay its 1982 and I only run one app) or for each app to ship with its own version of the .dll's.

    Stories like this really do major harm to slashdots geek-cred. You people really expose yourself as poseurs.

    1. Re:Non-issue for actual msdn coders like myself by mikelieman · · Score: 1

      Well, how do you deal with a user who has applications dependent on different versions of libraries then?

      Do you just say "FU" to them?

      --
      Technology -- No Place For Wimps! Grateful Dead and Jerry Garcia Chatroom -- http://www.wemissjerry.org
    2. Re:Non-issue for actual msdn coders like myself by Tony+Hoyle · · Score: 5, Insightful

      No, because that's what sxs solves. You can have multiple versions of the MSVCxxx libraries installed and each app can find the correct one.

      It's similar to the library versioning that unix does, except instead of changing the filename each library has a manifest containing its version number and a checksum of the library, and the loader knows how to fing the right one.

      This is a complete non-story written by someone who doesn't test applications on a clean system prior to distribution, then wonders why it doesn't work.

    3. Re:Non-issue for actual msdn coders like myself by sco08y · · Score: 2, Informative

      YHBT... anyhow, on OS X you can have multiple versions within a framework, and frameworks private to an application. So "it just works."

      Packages work beautifully. Anything I need for my app can be bundled right along with it, or in any of the standard directories.

    4. Re:Non-issue for actual msdn coders like myself by Tony+Hoyle · · Score: 2, Informative

      Multiple versions per framework is essentially how sxs works.. it's the same idea.

      Private frameworks to an application isn't new - you can put DLLs local to a windows app too if you want.. OSX has a global frameworks directory that is similar to the sxs directory, and has the same problems eg. if you're linking to the itunes lib you have to check the one you're writing with is on the target system in the package installer (or install it, but for something like itunes that's probably a bad idea).

    5. Re:Non-issue for actual msdn coders like myself by bit+trollent · · Score: 1

      So your laughing at the people who suggest ways that the .dll update would not have broken their app?

      Are you also laughing at the fact that an application that was perfectly functional on monday up and died on patch Tuesday requiring the code to be recompiled and installed on every computer the app is on?

      I've had applications that I use (but didn't write) fail after patch tuesday and be restored by a system recovery only to be killed again the next time the system updates. I'm looking at you ATI all-in-wonder tv tuner driver...

      But that's not what you are here to talk about. Nope you're here to broadcast arrogant windbag bullshit.

    6. Re:Non-issue for actual msdn coders like myself by OrangeTide · · Score: 1

      statically linked libraries have their place. but yes, this isn't one of them.

      someone should make a full featured OS where everything is statically linked. and then watch the armchair developers scream about how it requires gigs of RAM to run more than 2 common applications at once.

      although actually, there is very little shared code between something like Firefox and something like Office. In the Unix world a lot of libraries (like the whole constellation of X11 libs) are common over many applications. In Windows everyone seems to have their own private framework and toolkit.

      --
      “Common sense is not so common.” — Voltaire
    7. Re:Non-issue for actual msdn coders like myself by Anonymous Coward · · Score: 5, Informative

      Oh jesus christ I can't stand how fucking idiotic everything in this discussion is.

      What happened: In August, they released a patch to the IDE that required a new version of the shared libraries. Binaries built with this patched version of the IDE/compiler/toolchain will by default require a version of DLLs that aren't installed by default on many systems.

      What would have prevented this asshat's blog post: Write a fucking installer that includes the DLLs you use. Thus, when your compiler changes, and your new packages rely on some stuff, magically that 'some stuff' is bundled along with your binary, and everything _still works_. Relying on OTHER packages to have good installers that properly put stuff in to SxS is just idiotic. "Wah, I rely on stuff that I'm specifically told I can't rely on, Microsoft sucks, and SxS is evil!"

      No. SxS has been SAVING your ass from updates like this since Windows XP. Surprisingly, you can now NOT recompile your project, and have it still work, even though there's a newer version of DLLs you depend on, because the backwards compatibility problem of these DLLs is just gone. The version YOU want and need and depend on is still there, still usable. Something else on the system that wants the newer version gets it, and all its patched glory. This is actually a security hole, and in THAT case, the DLL you depend on WILL change to fix the security problem. Nothing in the August 2009 update to VS 2005 seems to indicate that this happened, it's only for newly compiled binaries.

      So, in summary: The blog poster is an idiot, he hates his user, he's too lazy to write a real installer, he has incompetent developers that don't care about the security of their product, and he asked for help and got 4 completely idiotic responses. Now everyone on slashdot who knows nothing about SxS and the actual problems it causes (and yes there are some) think that it's the same problem we've always had, but worse.

      Note: I'm not a Windows developer (Linux developer), and I've not used Windows in well over a year (Mac user). But I've been bitten by SxS in my last job and dealing with VB.Net, back when I didn't know I had to make a real installer for my stuff. I somehow managed to learn to not be an idiot, and the blog poster should too.

    8. Re:Non-issue for actual msdn coders like myself by Hatta · · Score: 0, Troll

      the loader knows how to fing the right one.

      With it's finger I'd assume.

      --
      Give me Classic Slashdot or give me death!
    9. Re:Non-issue for actual msdn coders like myself by master_p · · Score: 0, Troll

      Microsoft's SxS system is pure bureaucracy. Linux's versioned DLL system is a much better and simpler solution.

    10. Re:Non-issue for actual msdn coders like myself by Blakey+Rat · · Score: 2, Informative

      Whether or not that's true, either way this is a non-story. The point is that the OS makers already address this exact situation with technology X, and since he's not using technology X he has a program that no longer runs. That's not Microsoft's fault any more than it would be Linus' fault if his buggy application ran on Linux.

    11. Re:Non-issue for actual msdn coders like myself by Anonymous Coward · · Score: 1, Insightful

      They're virtually identical. Linux encodes the version number in the filename, which is bad practice for the same reason that file extensions defining file types are bad practice, but it's human-readable. Windows encodes the version number in human-readable XML, and goes one step further by giving it a checksum.

      The one other visible difference is if you try to gaze into the internal implementation details of Windows by navigating to %windir%\SxS and then take a naive view of the size of the directory, you might get your panties in a twist. Now, granted, the SxS structure there also essentially encodes version information in the directory structure, not so different from Linux, but abstracted away by the OS.

    12. Re:Non-issue for actual msdn coders like myself by gzipped_tar · · Score: 1

      This, IMHO, shows why binary-based distribution doesn't work.

      Most coders just write against API and should not care about binary compatibility. Distro guys aggregate the sources and choose compiler etc. so different parts of an OS are kept self-consistent. All binary updates are managed by a package mgmt. system with so users are less likely to be hit by unstable dependency updates that breaks other parts. Packagers are supposed to test updates and resolve conflicts in a cooperative manner with upstream.

      Of course in practice there are shitty packagers just like there are shitty coders, but the mechanism itself is sound. The buffer zone created by distro packagers means much better stability for the end user.

      And this cannot be done unless packagers can read source, compile their own versions, and hack along without worrying about being sued into oblivion.

      --
      Colorless green Cthulhu waits dreaming furiously.
    13. Re:Non-issue for actual msdn coders like myself by Anonymous Coward · · Score: 0

      You can have multiple versions of the MSVCxxx libraries installed and each app can find the correct one.

      As opposed to, I dunno, not breaking ABI so older applications can work with newer libs? I've never seen glibc break ABI for the 7 to 10 years I've been using Linux, nor libgcc. Even libstdc++ has stablized. Doom3 Linux, a 5+ year old pre-compiled executable built with GCC 3.4 (if I'm interpreting less correctly), will still work with the newest libstdc++ and libgcc_s provided by GCC 4.3. Will Doom3 Windows work with VS 2009's DLLs, or will it need the old DLLs, from whichever version of VS they built it with?

      People keep saying this isn't the return of DLL hell, and I have to agree. It can't be returning, because DLL hell never went away. Each app still needs its own specific DLL versions, and die horribly if it gets a different/newer version. The fundamental problem (constant ABI breakage) is still prevalent. The SxS stuff just attempts to hide all the gory details that each app needs specific DLL versions, but just because you don't see that problem doesn't mean it isn't there. It provides *some* reprieve if a couple different DLLs or apps happen to need the same specific DLL version, but that's about it. Apps can and do still load 2 or more different versions of the C runtime (you know, that standard specification that's been around for over 20 years), and cause all sorts of havoc with trying to pass (for example) a file descriptor to a DLL function for it to use.. its C runtime may not recognize objects created by your C runtime, and vice-versa. This is DLL hell, and it's still happening.

    14. Re:Non-issue for actual msdn coders like myself by Anonymous Coward · · Score: 0

      They're virtually identical.

      Except the implementation is horrid. You can't just drop the needed DLLs next to your app, anymore. You have to go through an installation process, using the whole redistributable executable package, for the one DLL to get recognized. If it wasn't installed "properly", it won't work, and all you get is a cryptic "did not initialize properly" message. Now, while I generally encourage installing common DLLs (hey, that's what they're supposed to do, get installed and be shared).. sometimes it's just better to drop the DLL(s) next to your EXE. Like, say, for a quick and simple test of your app on another machine. But it suddenly becomes not so quick and simple anymore, and leaves many would-be developers scratching their heads about why it won't work.

      Not to mention the wasteful manifest and cat files themselves. Does it really take almost 10KB of external files under unpronounceable folder names (x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd) to replace ".maj.min.rev" and add a useless hash?

    15. Re:Non-issue for actual msdn coders like myself by terjeber · · Score: 1

      Linux's versioned DLL system is a much better and simpler solution

      Rubbish. As anyone who has worked with various Unices could explain to you, you can have your app load a different version of a library by either just changing its name, or more commonly, soft-linking to it. Interestingly this may or may not be a good thing. Soft linking a "version 2" of a dynamic library to a version 3 can create its own set of problems. It happens all the time on Unix variations.

      Adding versioning and checksums to the regime of loading dynamically linked libraries is universally a good thing, the new MS way of doing it is vastly superior to the old MS way and also vastly superior to the (much older) Linux/Unix way. I am willing to bet that as Linux gets more and more traction in the corporate world, Linus will find a way to duplicate the MS functionality though probably not the method. It is simply a good idea.

    16. Re:Non-issue for actual msdn coders like myself by Anonymous Coward · · Score: 0

      Ideally, the lib's ABI should not be broken so readily. Under Linux, at least, an app links against a shared lib using its major (ABI) version number. So, say you have libfoo.so.1.4.2. Your app would look for libfoo.so.1. As long as new versions of the lib remain backwards compatible, the library will be called libfoo.so.1.something, with libfoo.so.1 symlinking to it. There could be issues with an app linked against a newer lib and is run using an older lib with the same ABI version, but missing symbols and/or library functions that can check for a minimum lib version would take care of that simple enough.

      If the ABI does have to change/break, it's renamed to libfoo.so.2.something (or libfoo-2.so.0.something, depending on what ways the original still needs to be used). You should never symlink one ABI version to another, and anyone who recommends to is a fool. The SxS stuff is much too strict and convoluted for what it's needed for. Versioning is all well and good, but there's no need to use obtuse XML files, hash checksums, and other crap. Keep the solution small and simple, and you run less risk of introducing more problems than necessary.

    17. Re:Non-issue for actual msdn coders like myself by shutdown+-p+now · · Score: 2, Insightful

      Most coders just write against API and should not care about binary compatibility.

      A well-designed stable API should also ensure binary compatibility. That's almost a given with C APIs, fairly trivial to get with Java or .NET, and needs special attention but definitely possible with C++.

    18. Re:Non-issue for actual msdn coders like myself by mikelieman · · Score: 1

      "written by someone who doesn't test applications on a clean system prior to distribution, then wonders why it doesn't work."

      Well, what happens when someone INSTALLS the applications on a system which isn't clean?

      Shouldn't that be tested, too? Your comment seems to imply that the configuration shouldn't be in some way.

      --
      Technology -- No Place For Wimps! Grateful Dead and Jerry Garcia Chatroom -- http://www.wemissjerry.org
    19. Re:Non-issue for actual msdn coders like myself by Anonymous Coward · · Score: 0

      that is all well and fine, however Microsoft also pushed via Auto-update a patch to visual studio 2005 at the SAME time via normal windows update. we have auto update enabled on all our machines so it installed it automatically at 3am on the build machines. at 6am builds started and at 8am people started complaining the builds didnt work anymore. Our installers install the version of the binary we used (762) however the autoupdate now required us to use the new versions which
      1. we didnt even know was coming
      2. we cant even use as we have lots of third party libraries to rebuild and ask vendors to rebuild. Running both versions would be doable except microsoft considers it a bug if your executable links to more than one version of the crt.
      3. the patch was to fix bugs in ATL. we DO NOT USE ATL. they also changed and upgrade the CRT and MFC (which we also dont use) at the same time for no reason!

      We had no choice but to rollback the automatic update and disable autoupdate on all build machines (6 of them) and all developers (30 of them).

      We make dedicated embedded systems (running W2003) so our boxes are locked down expect for the ports we need.

      MS didnt make it clear that number 1 and 3 above were even going to happen.

      rob

  10. Re:Why don't apps just use their own copy of the . by 644bd346996 · · Score: 1

    What do you do when a security vulnerability or other serious bug is found in the version of the DLL? Do you trust the app vendor to be around to release an update in a timely fashion? Or would you prefer Microsoft releases an update that looks for any outdated DLLs anywhere on your hard drive and overwrites them? What if there are games that, as an anti-cheating measure, check the hash of their version of the DLL to detect tampering?

  11. You should not blame Microsoft for this by igomaniac · · Score: 5, Insightful

    Everybody who developes applications for the Windows platform should know that you need to include the merge module for the C/C++ runtime libraries in your installer. You've just been luck so far that other applications have installed the DLL's you needed for you. Try your app the way it is on a clean install of Windows XP without the service packs and see how well that goes :P

    In fact the SxS assembly system in windows is the only real way out of DLL hell, much better than the versioning scheme for shared libraries used in Linux. Get your facts straight before posting.

    --

    The interactive way to Go -- http://www.playgo.to/iwtg/en/
    1. Re:You should not blame Microsoft for this by Tony+Hoyle · · Score: 5, Insightful

      Indeed.. this is a non-story. If the submitter had distributed his app correctly it would have worked out of the box. Instead he decided to rely on a specific version of a DLL being installed on the target system, then blames Microsoft when it all goes to hell.

    2. Re:You should not blame Microsoft for this by Gerald · · Score: 1

      How does that work for PortableApps or U3 packages?

    3. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      That's nice, except there are three problems:

      1) It was an automatic update. Are you deploying the CRT from DLLs checked into source code control? Screwed. Embedded them into an installer build already? Screwed. In both cases your build breaks first and you have to manually fix it.

      2) Many vendors still ship libraries to customers in .lib form. This is a bad idea for many, many reasons, but it's still frequently done. Now you've got your code building against the 4053 CRT and you're trying to link against LIBs that pull in the SP1 CRT. This doesn't work, and you have to convince the vendor to give you updated .libs. This assumes that they will actually accommodate your request, which they might refuse.

      3) If you have a large enough build process, you may have modules getting compiled from different machines. Guess what happens if not all of the machines have gotten updated yet?

    4. Re:You should not blame Microsoft for this by JohnFen · · Score: 5, Insightful

      In fact the SxS assembly system in windows is the only real way out of DLL hell, much better than the versioning scheme for shared libraries used in Linux.

      Better than the Linux scheme + proper shared library design? How? I've done extensive work with both, and the SxS scheme seems like like a gigantic, fairly ugly hack to me (albeit not as ugly as a lot of other hacks) and Linux's scheme, while not perfect, seems much more elegant and reliable.

      I'm not trolling or picking a fight, I really want to know.

    5. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 2, Insightful

      So how is this better? How is it better that when a library has a vulnerability, one has to go over every single application in their system because they all decided to bundle their own, to be sure it won't end up affecting him/her? Not saying you're wrong, maybe I am missing something about what SxS means, but I'm not convinced it is a better scheme.

    6. Re:You should not blame Microsoft for this by igomaniac · · Score: 2, Insightful

      Why do you think it's a hack? I mean, the manifest files used by the SxS assembly system are much more expressive than the three digits used by libtool versioning to tell which shared libraries can be loaded for a specific process. Also note that two DLLs loaded into a process can reference different major versions of the same third DLL without a name clash (leading to two versions of it being loaded), while that's AFAIK not possible with shared libraries.

      http://www.freesoftwaremagazine.com/books/agaal/building_shared_libraries_once_using_autotools

      The SxS system also has some additional security since it uses signatures for the DLLs when loading your process, so it's much harder for a hacker to replace the library you're using behind your back (by setting LD_LIBRARY_PATH for example).

      --

      The interactive way to Go -- http://www.playgo.to/iwtg/en/
    7. Re:You should not blame Microsoft for this by igomaniac · · Score: 1

      This was a _minor_ version update which means that the newer library gets loaded even for DLLs that reference the older version. So I think your points are all not valid. It's just that this guy forgot to include the runtime libraries in the installer or had some kind of weird setup where he was not including the patched version of the runtime libraries even after his build machine had been patched.

      --

      The interactive way to Go -- http://www.playgo.to/iwtg/en/
    8. Re:You should not blame Microsoft for this by Cyberax · · Score: 2, Insightful

      Have you tried to install DLLs without using MSI?

      It's not so easy with NSIS, for example. And don't get me started on shared DLL usage counters...

    9. Re:You should not blame Microsoft for this by QuoteMstr · · Score: 1

      Also note that two DLLs loaded into a process can reference different major versions of the same third DLL without a name clash (leading to two versions of it being loaded), while that's AFAIK not possible with shared libraries.

      This is a terrible idea due to the two versions potentially clashing in other ways (think different definitions of the same shared data structure), but if you really want to do it, OS X's two-level namespace feature can do that.

    10. Re:You should not blame Microsoft for this by igomaniac · · Score: 1

      if one of your DLLs were complied with one version of the datastructure and the other with another version, how else would you try to run this? Do you think the libtool system can solve this? ... Of course it goes wrong if your application starts sending datastructures between DLL A and DLL B which are using different major versions of DLL C, but you can actually code around this. It's better to upgrade your dependencies so they use the same version of DLL C, but sometimes that's just not possible so you have to work with what you've got.

      --

      The interactive way to Go -- http://www.playgo.to/iwtg/en/
    11. Re:You should not blame Microsoft for this by QuoteMstr · · Score: 5, Insightful

      The SxS system also has some additional security since it uses signatures for the DLLs when loading your process, so it's much harder for a hacker to replace the library you're using behind your back (by setting LD_LIBRARY_PATH for example).

      Funny, it's only proprietary software authors that think this way. Over here in the free world, application flexibility is seen as a Good Thing. LD_* hacks might not be the most elegant way to implement certain functionality, but the approach certainly makes hard things possible.

      And again, the SxS signing approach doesn't actually add any real security. Someone wanting to modify an application will find a way to do it regardless of any special "don't modify me" bits the application might contain.

      (Go ahead and moderate this troll. That doesn't make it any less true.)

    12. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      Either they ship private assemblies, or they are broken in the first place.

    13. Re:You should not blame Microsoft for this by igomaniac · · Score: 2, Insightful

      And again, the SxS signing approach doesn't actually add any real security. Someone wanting to modify an application will find a way to do it regardless of any special "don't modify me" bits the application might contain.

      You think public key signatures of the executable and it's dependencies is not real security? ... Then what is?

      --

      The interactive way to Go -- http://www.playgo.to/iwtg/en/
    14. Re:You should not blame Microsoft for this by QuoteMstr · · Score: 1

      sometimes that's just not possible so you have to work with what you've got.

      The only time something like this should not be possible is when you're working with some plugin system that needs to support old plugins. (Consider in-process Windows Shell Namespace Extensions).

      If there's anything we've learned over the past 20 years, it's that shared-library plugin systems are a really bad idea due to the issues you've just described. It's almost always better to execute plugins out-of-process and communicate over restricted IPC mechanisms. That's the direction modern browsers are heading in.

    15. Re:You should not blame Microsoft for this by QuoteMstr · · Score: 1

      You think public key signatures of the executable and it's dependencies is not real security? ... Then what is?

      What's to stop you from substituting a key of your choice into the executable? What's to stop you from patching the code that verifies the signatures?

    16. Re:You should not blame Microsoft for this by mysidia · · Score: 1

      3) If you have a large enough build process, you may have modules getting compiled from different machines. Guess what happens if not all of the machines have gotten updated yet?

      You never update build machines without qualifying those updates first. And once you've qualified them, you stop all build processes until update is finished, roll out the update to all machines immediately.

      Re-test complete build, and if it doesn't work out, you take your backup plan and revert the update.

    17. Re:You should not blame Microsoft for this by Comatose51 · · Score: 1

      "Better than the Linux scheme + proper shared library design? "

      But that's the problem here. Microsoft hand holds a lot of developers who might not be experienced or talented enough to do good design. This is an obvious trade-off here but the Microsoft strategy has always been that they're the solver of difficult design problems and everyone else outside of MSFT plug themselves into that framework. This greatly lowers the initial cost of development, which is why there is a ton of Windows software out there. They supposedly do the same internally with an architect and a group of coders to support him for each team. What they're doing now is just a macroscopic version of that. The downside is of course they end up having to support their previous designs and whatever else the legions of Windows developers have done. It's a pretty good strategy/trade-off but there are obvious costs to this. My experience with Linux is definitely nearly as extensive as yours but my experience with .Net is decent and I recall it being relatively easy to get going. Maybe I'm misunderstanding the degree of difficulty involved in doing something comparable in Linux. Other than the Java framework and perhaps Mono, I don't see a comparable environment in Linux.

      --
      EvilCON - Made Famous by /.
    18. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 1, Funny
    19. Re:You should not blame Microsoft for this by dvh.tosomja · · Score: 0

      The proper way to deal with libraries incompatibilities in linux is to give source code of your app to distribution maintainers and let them do their job. The result should be new updated package on clients computers delivered via distributions packaging systems. Simple.

    20. Re:You should not blame Microsoft for this by QuoteMstr · · Score: 1
    21. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      While I think SxS is rather poor, Linux is no angel either.

      We had an app that used a modified version of the IJG JPEG code (statically) as well as a Ghostscript shared library (which statically uses a version of the IJG code).

      This works fine under Windows as it turns out, even with modified versions of the library.

      However, under Linux, Ghostscript calls the *wrong version* of the library resulting (in this case) in a crash.

    22. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      You can supply a manifest with your executable that forces it to use a local copy of whatever dependent dlls you have. So no problem with the portable apps, but you still have to package it right. If the developer does their job right, the user has no issues either way

    23. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      It isn't any extra 'security' at all. What exactly is it securing? Anything (or anyone) that has the ability to modify your program can already do pretty much whatever they want to it, the operating system, and the user's data. It does absolutely nothing to secure your program, the user's computer, or the user's data.

      If you think you can prevent someone (particularly the computer's owner) from modifying your software, you're sadly mistaken. Just like .NET's strong names, you can strip the signatures off of any components you want to. They aren't mandatory, after all, and they'll work just fine without them. You could also just re-sign them with a different key. Trickier if you're re-signing a DLL, but certainly not impossible.

    24. Re:You should not blame Microsoft for this by QuoteMstr · · Score: 1

      When you create a shared library, it is essential to mark all symbols except those meant to be used by other modules as invisible. Try using -fvisibility=hidden. Otherwise, symbols from other modules (or the main program) can override the ones in your shared library, wreaking havoc. On ELF platforms, all symbols are visible by default. This is a Bad Thing. Windows actually got this one right, and forces programmers to mark which symbols in a DLL are exported.

    25. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      I'm not super familiar with the windows security model, but I'd bet that whenever you are actually running machine code on a machine, there are thousands of ways of loading new machine code into memory. Some "don't load" security bits honored by the linker won't make much of a difference when you're reading the dll into memory with your own code.

      The dlls aren't encrypted, they're signed, so it's up to the code reading them to honor the signature or not honor it.

      The one thing this would be useful for is if you had proper W^X memory support, so it was impossible to re-implement the linker. Does windows do this?

      Anyway, windows admins I know aren't usually concerned so much with local privilege escalation, so I'm not sure exactly how useful all of this is in the real world.

      Also, I'm not sure how much more security cryptographic signatures are than just marking the dll as writable only by root, or only reading dlls from read-only areas of the disk (exactly how a hardened linux machine would do it). If you have root privileges, all bets are off, because you can *patch the linker*. If you don't, then filesystem permissions seem like enough.

      Please take with a grain of salt, as I'm not a windows admin or developer. Also, I'm not even saying that this scheme isn't secure, just that it doesn't seem to add any security to something much much simpler.

      Please let me know if I've misunderstood anything about how the windows world works, I haven't developed in windows in ages.

    26. Re:You should not blame Microsoft for this by JohnFen · · Score: 2, Insightful

      It seems like a hack to me because it's overengineering a solution to problem that seems to be caused by poor design choices. The more elegant solution is to make good design choices. Admittedly, Linux's solution is of the same vein, but at least it's not overengineered, and so it doesn't actively encourage poor programming practices.

      As others have pointed out, your DLL example is itself an example of suboptimal engineering. Your situation should never arise in the first place, and is an example of underlying problems. To make it work without fixing the underlying problems is a hack.

      But I'm fascinated by this part:

      The SxS system also has some additional security since it uses signatures for the DLLs when loading your process, so it's much harder for a hacker to replace the library you're using behind your back (by setting LD_LIBRARY_PATH for example).

      Why do you think this is a good thing? In my opinion,the flexibility of being able to replace shared libraries "behind an application's back" is highly desirable, and is one of the benefits of using shared libraries.

      If you app is performing a function that really needs to be as locked-down and secure as possible, then you shouldn't be using shared libraries or DLLs at all. Fortunately, there are very, very few types of apps where such concerns are valid.

    27. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      application flexibility is seen as a Good Thing. LD_* hacks might not be the most elegant way to implement certain functionality, but the approach certainly makes hard things possible.

      But, but, but, when Windows does it, it is bad.

    28. Re:You should not blame Microsoft for this by roemcke · · Score: 3, Insightful

      You think public key signatures of the executable and it's dependencies is not real security? ... Then what is?

      Security never ever works if the attacker and the one being attacked is the same person

    29. Re:You should not blame Microsoft for this by Blakey+Rat · · Score: 5, Insightful

      A thing that a LOT of Linux programmers (and a lot of programmers in general) seem to miss is this simple fact, bolded for emphasis:

      Most programmers suck.

      The very fact that you're here reading Slashdot means it's likely that you do not suck. Most programmers do. For most programmers, "cargo cult" programming is a way of life. The majority of programmers do not, and never will, fully understand pointers to the level where they would be able to re-create the C++ STL by themselves. Relevant to this discussion: most programmers don't know how linking works, they just hit the "Play" button on the IDE and off it goes. Most programmers have zero knowledge of user permissions or fast user switching, and see nothing wrong with writing their application data in the Program Files folder.

      Most programmers never, ever read the API documentation. Not only do they have no problem using deprecated functions, but they don't even know what functions are deprecated.

      And when their programs break because of this? They blame Microsoft! It's Microsoft's fault, always Microsoft's fault!

      Now the open source community might be lucky enough that it has no bad programmers. (I doubt it, but let's play along.) Good for you. Microsoft, unfortunately, isn't that way: one of their biggest challenges is to keep terrible programmers from constantly breaking their own apps and/or Windows itself.

      What I'm getting at here is that Microsoft's goal is to make programming for Windows as easy and hands-off as possible. Any solution to this problem that requires the programmer to fix their application is far inferior than a solution that works "automatically."

      The programmer who posted this topic didn't read Microsoft's documentation, and screwed up his application's installer so that it links directly to a specific library version DLL instead of to the version-agnostic DLL. He's one of the bad programmers I've been talking about, but to be fair: considering he's actually posting here, it's probably one of the best of the bad. Hopefully he'll take something away from this and Slashdot won't spend the entire thread bashing Microsoft for no reason, but I doubt it.

    30. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      If you can overwrite the file you're already an admin and can do anything you want.

      The signature on a SxS assembly acts more like a GUID for the publisher. The public key makes up part of the "strong name" of an assembly so two different publishers can have a utils.dll without them getting mixed up.

    31. Re:You should not blame Microsoft for this by FJGreer · · Score: 1

      I've never had much problems with the Linux shared library system. Works pretty well if you use it properly. And if you need some weird version of a library, just make sure your app links to it specifically. (If I remember correctly, libraries in the same directory as the executable have higher precedence over system libraries in LD_LIBARY_PATH?)

      --
      Behold! Uh, what was I going to say?
    32. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      You do realize that since I, as a user, have access to your binary, you cannot do anything - even if the OS prevents execution of unsigned apps, there will likely be ways around it.

      Think about it - I your EXE is assembly. There's nothing stopping me from changing your assembly into something that ignores the security checks. It's even possible to do this to Skype, albeit slightly more difficult.

    33. Re:You should not blame Microsoft for this by ClosedSource · · Score: 1

      "The very fact that you're here reading Slashdot means it's likely that you do not suck."

      I see it more like this: "The very fact that you're here reading Slashdot means it's likely that you think most programmers suck."

      One's personal suckness is still an open question.

    34. Re:You should not blame Microsoft for this by ClosedSource · · Score: 1

      Why is it in a discussion of shared code that the value of fixing a bug in only one place is always mentioned but not the impact of creating a bug in one place and having it screw up a lot of different applications?

    35. Re:You should not blame Microsoft for this by gadzook33 · · Score: 1

      Mod parent up. I'm so tired of the security-is-all-smoke-and-mirrors-so-why-bother argument.

    36. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      Its not just library versioning linux has. It also has symbol versioning within the same library. That's why there is only one C library that works for every app on Linux, even while apps need different behaviors for the same function.

      I wish Windows had just one C library. Look at the Windows OS and see what C library it uses. There's only one. But they give developers a different one with Visual Studio to make their lives more difficult.

    37. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      You think public key signatures of the executable and it's dependencies is not real security? ... Then what is?

      Yes, igomaniac, signatures stored alongside the binary are uber-flawless real security. And better than nothing. Signatures for source and binaries at the package management level might also be considered "real security."

    38. Re:You should not blame Microsoft for this by troll8901 · · Score: 1

      this simple fact, bolded for emphasis:

      I don't think they actually suck. I think they are simply pressurized to produce results in the quickest time possible. I think part of the blame goes to the commissioning clients.

      And part of the blame goes to the "simple is best" mentality in some schools of thought. Simplicity is NOT elegance.

      Also, opinion is NOT fact.

      Most programmers have zero knowledge of user permissions or fast user switching, and see nothing wrong with writing their application data in the Program Files folder.

      Surprisingly, I see Cobian Backup, Avast! antivirus, and some other software being rather multi-user aware. Cobian v8 is open source, Avast! Home is freeware. These little attention to details impressed me a lot.

      Most programmers never, ever read the API documentation.

      Then what do they rely on? Their IDE's ability to suggest methods and properties when they type?

    39. Re:You should not blame Microsoft for this by igomaniac · · Score: 1

      If you app is performing a function that really needs to be as locked-down and secure as possible, then you shouldn't be using shared libraries or DLLs at all. Fortunately, there are very, very few types of apps where such concerns are valid.

      You do realise that the SxS cache is primarily used for system libraries like the C runtime, MFC and ATL? I've yet to see any third party ship their libraries as SxS assemblies. I think it's probably quite important that it's hard to compromise the system DLLs, and since almost all programs use them it's a huge win to have them in the SxS cache instead of distributing them in each application's directory.

      --

      The interactive way to Go -- http://www.playgo.to/iwtg/en/
    40. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      Not only do they have no problem using deprecated functions, but they don't even know what functions are deprecated.

      That is at least partially because all microsoft APIs have only two states - beta and deprecated. There may be a 3 week window where an API is the recommended way of doing thing, but if you don't obsessively attend their conferences and read their magazines you will be miss that as soon as they hire the next years batch of coders in Redmond and write a different API that does the same thing (only this time it will work, honest guv, unless you use a parameter bigger than 32767 in which case you are SOL; you could try using the new "Ex" function but that will only work if you have Internet Explorer 8 installed).

      And when they create the new API they don't bother updating the old documentation to point to the new stuff. Half the links on MSDN are broken anyway because they completely rearrange the website every year or two, and if you use their search function it will only find old versions of the SDK (which don't have links to the newer one, of course).

    41. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      No, you cannot blame programmers for the operating system not implementing proper administrator privileges serparation during the first 20 years of the os life. It's not as if this kind of 'concept' were unknown in thoses early days ...

      I'm quite sure if the said programmers where to type sudo before each of their program execution, they would have understood loooong time ago that their (and their customers) best interest is to correctly use users permissions. No documentation needed.

    42. Re:You should not blame Microsoft for this by Rogerborg · · Score: 1

      You're assuming that because A doesn't satisfy B that there must be something else that does? How peculiar.

      --
      If you were blocking sigs, you wouldn't have to read this.
    43. Re:You should not blame Microsoft for this by Blakey+Rat · · Score: 1

      ... Except Windows *did* implement proper administrator privileges, starting with NT3, hitting the mass market in Windows 2000 Pro (1999), and becoming the standard for everybody with XP (2001). And believe me, system administrators have been ragging on developers to fix for for a long, long time. I can't be the only one who spent like 5 hours a weke just manually tweaking permissions on folder and registry entries until some shitty third-party app would run.

      There's no excuse for this, and there hasn't been for a solid decade. You're acting as if Windows 2000 Pro was released yesterday. It wasn't.

    44. Re:You should not blame Microsoft for this by Blakey+Rat · · Score: 3, Informative

      I don't think they actually suck. I think they are simply pressurized to produce results in the quickest time possible. I think part of the blame goes to the commissioning clients.

      You just haven't worked in enough offices. Believe me, we have people working for our company, producing software, who couldn't code their way out of a wet paper bag. And they're not under any particular time pressure. (We also have a guy who does really good work, but he's so slooow... in that case, you're right, but from my experience that's the minority.)

      And part of the blame goes to the "simple is best" mentality in some schools of thought. Simplicity is NOT elegance.

      Possibly; but if you know that your shop has coders who won't understand the elegant code, you're better off writing simple code to accomplish the same task. Otherwise, they'll fuck up your elegant code and produce buggy, bloated results. Joel wrote an article about this recently: http://www.joelonsoftware.com/items/2009/09/23.html making that very point.

      Personally, I don't think elegance should be the goal. Who cares if it's elegant? The finished product is the important part, not the code and the UI is what people judge. I'm sure a lot of products with extremely elegant code have godawful UIs.

      Also, opinion is NOT fact.

      Shocker!

      Surprisingly, I see Cobian Backup, Avast! antivirus, and some other software being rather multi-user aware. Cobian v8 is open source, Avast! Home is freeware. These little attention to details impressed me a lot.

      Being multi-user aware isn't "a little detail", it's an industry standard! If they weren't previously for the NT series, they should have been patched to be multi-user away for Windows 2000 Pro, which was mainstream.

      That's not "impressive" that's just par for the course. That's like being "impressed" that it uses menus and buttons, or being "impressed" that it lets you switch which language the UI is in.

      Then what do they rely on? Their IDE's ability to suggest methods and properties when they type?

      That. Or Googling it. Or yelling, "hey Bob, what do you use to sort a list?" over the cubicle top. Or they keep an extensive collection of code snippets and they just copy and paste those in randomly until something works, or appears to work at first glance.

    45. Re:You should not blame Microsoft for this by troll8901 · · Score: 2

      Ah, thank you for your reply. It has certainly opened me up to the real world - on how programming teams operate.

    46. Re:You should not blame Microsoft for this by EXTomar · · Score: 1

      And again, the SxS signing approach doesn't actually add any real security. Someone wanting to modify an application will find a way to do it regardless of any special "don't modify me" bits the application might contain.

      You think public key signatures of the executable and it's dependencies is not real security? ... Then what is?

      To be exact: Public key signatures only insure "the package" has not been tampered since the packager created and signed it. It doesn't say anything about the quality of the package contents. This is hardly a problem exclusive to Windows but the way Linux and BSD are designed promote software that avoids the need for "side by side". In fact, on Linux if a package barks at me that I need an legacy version of commonly used and actively updated libraries, I know should do more research where I may have the wrong version, version compatibility issues, or I may need to build it myself. The last thing I would do is force it by throwing more out of date and unmaintained software at it which seems to be a common strategy on Windows.

    47. Re:You should not blame Microsoft for this by JohnFen · · Score: 1

      You do realise that the SxS cache is primarily used for system libraries like the C runtime, MFC and ATL?

      Yes, which is at the root of my point -- I expect system libraries to be properly designed and not require this sort of a logic layer just to get the system to work. Thus, the logic layer is a hack.

    48. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      Most Windows programmers suck.

      There, fixed that for you.

      When they released VB and said, "now any idiot can program!" that wasn't just hype....

    49. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      Right. Let us know when you manage to hack the compilers on Microsoft's own build boxes for Windows itself, or when you run across one of Microsoft's private keys.

      - T

    50. Re:You should not blame Microsoft for this by Anonymous Coward · · Score: 0

      Or they keep an extensive collection of code snippets and they just copy and paste those in randomly until something works, or appears to work at first glance.

      This is why elegant code is better - it makes shitheads like this stand out. Hopefully enough to get them fired.

    51. Re:You should not blame Microsoft for this by troll8901 · · Score: 1

      I'm so embarrassed after reading your reply initially, your sentence-by-sentence replies to my snips, that ... well, I just came back to read it the 2nd time, after all my embarrassment have died down.

      Thanks for your reply. :)

  12. DLL hell never left by eddy · · Score: 4, Interesting

    I upgraded my Fallout 3 installation yesterday. After patching, the game wouldn't run, returning some fairly obtuse message about import ordinals. So I googled the message, and found out it's because the game now links against a newer version of "Microsoft(R) Games for Windows(TM) Live(TM)" whatever. Note that this wasn't some new patch, it's months old and yet this problem, which must realistically be hitting quite a few users, persists. This isn't something you get via Windows Update either, this is just some obscure 'distributable runtime' crap you should know you need?

    So let me repeat that: Super mainstream game on a super mainstream platform (Vista x64), no add-ons, I patch to the latest version and it won't start, nothing is mentioned at the developer's site.

    Now I recognize good old Bethesda again. Here's how they'd be able to repro: Fully updated Vista machine, install game from DVD, apply patch, notice it won't fucking run.

    I don't normally give much for the 'PC-gaming sucks' choir, but c'mon..

    --
    Belief is the currency of delusion.
    1. Re:DLL hell never left by Anonymous Coward · · Score: 0

      Since Fallout 3 is buggy as Kathleen Fent's pussy on the console, I'd blame Bethesda.

    2. Re:DLL hell never left by causality · · Score: 2, Informative

      I upgraded my Fallout 3 installation yesterday. After patching, the game wouldn't run, returning some fairly obtuse message about import ordinals. So I googled the message, and found out it's because the game now links against a newer version of "Microsoft(R) Games for Windows(TM) Live(TM)" whatever. Note that this wasn't some new patch, it's months old and yet this problem, which must realistically be hitting quite a few users, persists. This isn't something you get via Windows Update either, this is just some obscure 'distributable runtime' crap you should know you need?

      So let me repeat that: Super mainstream game on a super mainstream platform (Vista x64), no add-ons, I patch to the latest version and it won't start, nothing is mentioned at the developer's site.

      Now I recognize good old Bethesda again. Here's how they'd be able to repro: Fully updated Vista machine, install game from DVD, apply patch, notice it won't fucking run.

      I don't normally give much for the 'PC-gaming sucks' choir, but c'mon..

      I had the same problem. Only, I run Fallout3 in Linux via WINE and there is apparently no way whatsoever to get xlive.dll to work in WINE. In addition, you do need the latest Fallout3 patches in order to install the expansions. Personally, I found it unacceptable that I would not be able to use any of the expansions merely because someone decided to add functionality that I never asked for, do not need, and will never use.

      I found a solution. There is a patch for Fallout3 that removes all Live functionality, and was sufficient to get the game working for me in WINE because it removes the dependency on xlive.dll. I can now use the game with all five expansions (Mothership Zeta was particularly fun). A page describing it can be found here while a direct link to the download is here.

      --
      It is a miracle that curiosity survives formal education. - Einstein
    3. Re:DLL hell never left by FJGreer · · Score: 1

      Completely OT: This is why I sold my soul to console gaming and bought an Xbox. If its not an FPS or a RTS I buy it for the White Box of Doom.

      --
      Behold! Uh, what was I going to say?
    4. Re:DLL hell never left by causality · · Score: 1

      Completely OT: This is why I sold my soul to console gaming and bought an Xbox. If its not an FPS or a RTS I buy it for the White Box of Doom.

      There are two things that prevent me from investing in a console. One, I personally think that the mouse is a superior input device when compared to the typical analog joystick found on a console (such as the Xbox360 to name just one of many). I especially feel this way on a game like Halo 3 where headshots matter. The other reason is compatibility and versatility.

      The mouse cursor moves as quickly as I can move my hand, and stops moving the instant my hand stops moving. The analog stick feels like I am scrolling towards my intended target. I'll use Fallout 3 as an example. With the mouse, I can be looking away and notice movement at the corner of the screen, and quickly turn the character around, aim directly at the target and fire in one fluid motion, like a reflex. The same game played on an Xbox360 doesn't allow me to react that quickly, because pushing the analog joystick toward the target enemy will scroll the cursor in that direction at a speed that is much slower by comparison.

      If you are familiar with Fallout 3, this means I rely much more heavily on VATS (auto-targeting) because playing free-hand is effectively crippled. Even in Halo 3 I often see people take pains to keep their cursor at about head-level, which to do correctly means guessing how far away the enemy wil be when encountered. They do this because they have limited ability to quickly and accurately target a small area and most of the skill involved boils down to working around this. In other words, I draw a distinction between an intentional game mechanic and the shortcomings of a controller.

      The other big advantage of PC gaming is compatibility. I don't have to worry about whether a game is only available on certain consoles that I may not have, because chances are there's at least a Windows version of it (that would execute via WINE in my case) if there is not a native Linux version. Additionally, if there is some glaring flaw in the game or some annoying feature, there are often mods and patches that can fix it. While there is such functionality on modern consoles, it's usually in the form of a pushed update that comes from some official channel, leaving you with fewer choices. A patch like the one I linked to earlier is just such an example.

      --
      It is a miracle that curiosity survives formal education. - Einstein
    5. Re:DLL hell never left by FJGreer · · Score: 1

      I get your drift. But for non "high precision" games I like the ease of just being able to put in a disc and play--and skip the hour installing it to my hard drive.

      --
      Behold! Uh, what was I going to say?
    6. Re:DLL hell never left by causality · · Score: 1

      I get your drift. But for non "high precision" games I like the ease of just being able to put in a disc and play--and skip the hour installing it to my hard drive.

      I don't mean this in a bad way, but if installing a game is really that much trouble I think you're doing something wrong. Linux+WINE is generally a more troublesome setup than straight Windows gaming and still isn't nearly enough of a bother to be a deciding factor for me, though I am not remotely a member of the "I just want it to work!" crowd. I like to tinker. Of course, YMMV.

      --
      It is a miracle that curiosity survives formal education. - Einstein
  13. Re:Why don't apps just use their own copy of the . by Anonymous Coward · · Score: 0

    So every time a security bug gets fixed in a system DLL, I have to scour my hard drive looking for versions of it to patch? And when any new program gets installed, I have to apply all relevant security patches to the system DLLs that it ships? Gee, it sure would be convenient if there was just a single location for all of those files!

    Oh wait, there is.

    dom

  14. Discussed on Visual C++ blog by Anonymous Coward · · Score: 5, Insightful

    This has been heavily debated in comments in the Visual C++ blog:
    http://blogs.msdn.com/vcblog/archive/2009/08/05/active-template-library-atl-security-updates.aspx

    Unfortunately, the VC++ team doesn't seem to understand what's wrong with pushing out a critical update through automatic updates that silently updates dependency requirements. I've personally seen projects that were suddenly broken by this update and the ensuing confusion that resulted.

    1. Re:Discussed on Visual C++ blog by shutdown+-p+now · · Score: 2, Informative

      I agree that updates to IDE & toolchain that introduce new dependencies for binaries produced by that toolchain shouldn't be silent. On the other hand, installing the application on a clean system (for every OS you support, and counting each major Windows version separately) and checking if it runs is one of the most basic tests that every new build of the product should go through. It's trivial to automate, too (if the installer is written properly and allows for silent installation) so there's no excuse not to do it even if you're a 1-man team.

      Good news: in Visual C++ 2010, CRT will no longer use SxS (instead they'll do the same thing Win32 guys are doing and guarantee back-compat with updates, and change the filename if they cannot do that).

    2. Re:Discussed on Visual C++ blog by MadKeithV · · Score: 1

      We did run the smoke tests, and saw the problem the very day the update came out.
      Unfortunately, with all the third party dependencies in our projects and confusion on what had actually happened, plus the delay in the update in VCRedist on the MSDN site, it actually took us a lot more time to get all our installers to work right again across all systems.
      We gained some understanding in merge modules and VC internals, and are less reliant on such things as the VCRedist exe download, so we did learn something.
      But I still believe Microsoft should have put out a big "how-to" after knowingly breaking a LOT of builds with an update.

  15. Re:Why don't apps just use their own copy of the . by Anonymous Coward · · Score: 0

    That doesn't always work. Sometimes the DLL in %system% will be in memory so your local copy won't load or visa versa which could cause issues with apps that need the version in %system%.

  16. Please note that this is C++ only by martinmarv · · Score: 1

    It does not seem to affect applications built in other languages (e.g. the .NET Framework).
    The summary should probably make this clearer.

    1. Re:Please note that this is C++ only by Tony+Hoyle · · Score: 1

      Yes it does - if you don't have the correct version of .NET installed your app won't run.

      It affects *any* external dependency. It's not unique to the MSVCxx libraries at all.

    2. Re:Please note that this is C++ only by martinmarv · · Score: 1

      That's a separate thing entirely. Of course applications built against version "A" of the .NET framework won't run on a machine that doesn't have version "A".

      OK, I could be clearer here. There may be .NET assemblies that use Interop to call unmanaged C++ assemblies that could potentially rely on some of the DLLs reference in the article.
      However, assemblies that do not rely on C++ DLLs will be fine.

    3. Re:Please note that this is C++ only by gbjbaanb · · Score: 1

      sure, but this is a minor update - its like you're trying to run on a machine that has version A.999.0.0 but not A.999.0.1 installed. In this case the version 8.0.50727.762 has been increased to 8.0.50727.4053, and there's no WU for the end-user machines, only those with Visual Studio installed.

  17. Time to question if DLLs are still needed by petes_PoV · · Score: 2, Insightful

    Now that memory is so cheap and disk space even cheaper, do we still need the small process sizes that dynamic linking brings?
    Would it be worth burning more RAM (although in an on-demand paged system, there's obviously no need to have your entire processl resident) to get rid of the problems associated with incompatible versions of libraries. Just go back to statically linking everything, so yo only ever need 1 binary - as all the routines it will ever call are already part of it.

    --
    politicians are like babies' nappies: they should both be changed regularly and for the same reasons
    1. Re:Time to question if DLLs are still needed by QuoteMstr · · Score: 1

      problems associated with incompatible versions of libraries.

      We'll never get rid of the problem with incompatible libraries until processes stop communicating with each other. What if two processes communicate over a shared memory segment where one version is using a data structure with an extra struct field? What about window message differences, drag-and-drop, and file formats? Sure, static linking might paper over some problems, but it won't free programmers from having to think about backwards compatibility.

    2. Re:Time to question if DLLs are still needed by Anonymous Coward · · Score: 0

      Now that memory is so cheap and disk space even cheaper, do we still need the small process sizes that dynamic linking brings?

      You may not have heard of the new fad sweeping the globe: netbooks with solid state drives. Most of these currently ship with 1GB of RAM, and many have only 16GB of harddisk space.

    3. Re:Time to question if DLLs are still needed by PhrostyMcByte · · Score: 1

      DLLs also allow better use of your CPU's cache. You might link one program as pure static and see it not lose speed, or maybe even see it go faster. But if all the programs out there started doing it, I'd be really curious to see if it helped or hurt.

    4. Re:Time to question if DLLs are still needed by Jahava · · Score: 5, Informative
      It's not just a matter of disk / process size. DLLs (and dynamically-linked libraries, in general) are also an important buffer between API and ABI differences that exist between OSes (Windows 7, Vista, XP, etc.) and OS versions (SP1, SP2, and even minor updates...). Dynamically-linked Libraries act as a buffer between the API / ABI layer and the application layer, allowing the OS to fundamentally change how it works (e.g., add a field to the Create a Window system call structure), update the associated DLL(s) (e.g., rewrite the "CreateWindow" function in core.dll), and have all of the applications installed on the system still work perfectly without needing a single update.

      Additionally, DLLs can enhance security. If there's a bug in MSVCRT.DLL, Microsoft can patch it and release it as an update. In a static world, every application that had that buggy code compiled into it would have to be rebuilt and redistributed.

      In a statically-linked world, every application would need to be rebuilt (on Windows, redistributed) every time an API / ABI change was released, as well as every time a bug was fixed. Furthermore, download sites would either have to release binaries for every API / ABI combination (that's a ton of releases per version) and deal with users downloading the wrong one, or do the open-source model and release the source, forcing the users to build the application on their system and rebuild every API / ABI update. And somehow I don't think the latter solution would fly with the Windows community.

      Like other posters have said, Microsoft's solution is actually not a bad one. Allowing multiple DLLs to be loaded simultaneously is not a pretty solution, but it's not a pretty problem that they have to solve, either. Advance with backwards-compatibility in mind as much as it makes sense to, and use SxS DLLs when it doesn't.

    5. Re:Time to question if DLLs are still needed by thePowerOfGrayskull · · Score: 1
      That's kind of like saying, "Why put this code that has been copied and pasted 300 times into a shared function? We have plenty of memory, this way we don't have to worry about if one caller wants to change the functionality."

      Of course, if you also don't see the problem with that, I really can't help you...

    6. Re:Time to question if DLLs are still needed by QuoteMstr · · Score: 2, Funny

      Why put this code that has been copied and pasted 300 times into a shared function?

      I see you've been working with C++ templates recently.

    7. Re:Time to question if DLLs are still needed by tepples · · Score: 1

      Now that memory is so cheap and disk space even cheaper, do we still need the small process sizes that dynamic linking brings?

      Yes, because bandwidth is not cheap. Nor are RAM and disk space when you're trying to cut a budget subnotebook computer's bill of materials to about $200.

    8. Re:Time to question if DLLs are still needed by ClosedSource · · Score: 1

      Yes, but if it's only copied and pasted 299 times..

      Seriously, sharing or not sharing code is always a trade-off. If you don't see that I really can help you - I just did.

  18. Oh? by QuoteMstr · · Score: 1

    I read the linked article, and don't see anything exciting. How is this any different from the shared libraries that have been used in the Unix world for 23 years? "Private assemblies" can be achieved with rpath or a simple manipulation of LD_LOAD_PATH (see Mozilla). And what does the asymmetric cryptography buy you over simply using the appropriate soname?

    1. Re:Oh? by John+Hasler · · Score: 1

      And what does the asymmetric cryptography buy you over simply using the appropriate soname?

      How could a "solution" that uses both encryption and XML not be superior to one that relies on a mere text string? Complexity is good, and XML is so withit.

      Besides, there may be some way to hook DRM in there. How could you not want that?

      --
      Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
  19. ... Is it the game or the OS? by Anonymous Coward · · Score: 0

    On the other hand, pristine Fallout 3 runs perfect on XP...

  20. Use managed code.. by WarwickRyan · · Score: 0

    Honestly there are now very problems which can't be solved more quickly and far more effectively in managed code.

    The difference is even bigger when talking multithreaded code. Solving those problems in C/C++ is akin to building single threaded applications in assembly - sure it's faster but the costs to produce bug free code are several orders of magnitude higher with with the modern replacement.

    1. Re:Use managed code.. by QuoteMstr · · Score: 4, Insightful

      Honestly there are now very problems which can't be solved more quickly and far more effectively in managed code. The difference is even bigger when talking multithreaded code.

      Writing "managed" code has nothing to do with using sane concurrency abstractions. You can do one without the other. Hell, you can easily write buggy managed code that relies on raw semaphores and deadlocks often, and you can write elegant message-passing C++ code. The key is the abstraction, not the runtime mechanism.

    2. Re:Use managed code.. by owlstead · · Score: 1

      The only real big benefit of managed code here is that if you use data structures are correctly (and this is a big if), and keep to immutable object instances, then you are reasonably sure that your threads don't influence each other since they cannot get into each others memory (and no, NX bits don't protect against data corruption).

      Of course, managed code such as Java may also have concurrency features build into the language. I don't think managed code has to do much with that though.

    3. Re:Use managed code.. by cheesybagel · · Score: 1

      Try writing graphics algorithms in managed code and then cringe at how slow it is.

    4. Re:Use managed code.. by WarwickRyan · · Score: 1

      I missed the word "few" (after "very") in my post - and doing anything meaningful with graphics is one of the exceptions. It's also one of the exceptions which can fall back to assembly because the unmanaged code's slow :)

  21. SxS is a fine technology by heffrey · · Score: 4, Insightful

    Yeah SxS works a treat. No more dll hell. Great for servicing too. The problem here is moronic devs not shipping the libraries that they link against. MS would be castigated if they didn't fix security holes. Why oh why does kdawson think this is a return to dll hell? Does he actually know what SxS is? Does he even have experience of windows development?

    1. Re:SxS is a fine technology by nstlgc · · Score: 1

      No, but he's a Slashdot editor - isn't that enough?

      --
      I'm Rocco. I'm the +5 Funny man.
    2. Re:SxS is a fine technology by 0123456 · · Score: 1

      Yeah SxS works a treat. No more dll hell.

      Indeed. As far as I can make out, it's turned DLL hell into SxS hell.

      One of my PCs just won't run a significant number of Windows programs anymore. As far as I can make out from the error message, it looks like _something_ in the lower levels of SxS hell is incorrectly configured. So how do I fix it? Uh, as far as I can see, I can't. I can't find any possible way to fix SxS hell short of wiping the disk and reinstalling everything.

      Maybe it's a good idea when it works, but looks like when it breaks you're totally fscked.

    3. Re:SxS is a fine technology by Blakey+Rat · · Score: 1

      What did you do to break it?

      Also, what do the errors look like?

      I'm curious... I've supported gobs of XP machines, and I don't think I've ever seen that before, or maybe I saw it and confused it for something else.

    4. Re:SxS is a fine technology by Rogerborg · · Score: 2, Funny

      If everyone ships their own copies of shared libraries, then shared libraries won't be a problem any more? You've cleaved that Gordian knot in twain.

      --
      If you were blocking sigs, you wouldn't have to read this.
    5. Re:SxS is a fine technology by makomk · · Score: 1

      No, the problem here is moronic Microsoft silently changing the libraries they're linking against in an automatic Windows update whose description fails to mention this. Modifying the installer to use the new libraries is a manual process - one developers aren't going to do unless they know something has changed. (Then there's the question of updates for already installed apps - apparently that's also a pain thanks to this.)

    6. Re:SxS is a fine technology by GravityStar · · Score: 1

      If modifying the installer for new redistributables is a manual process, than there are other problems than just a auto-updated toolchain.

      Previously, any security bugfix to a redistributable would also have gone unnoticed if updating the installer requires manual intervention. Meaning that the installer was always broken, just silently.

  22. This is why I use Delphi... by SensitiveMale · · Score: 1

    Yes, I may be the only one using Delphi, but my apps are self-contained and they run correctly every time.

    1. Re:This is why I use Delphi... by onefriedrice · · Score: 1

      This is why I just don't use Windows. That's easier than using an esoteric language.

      --
      This author takes full ownership and responsibility for the unpopular opinions outlined above.
    2. Re:This is why I use Delphi... by Gramie2 · · Score: 1

      God yes, Pascal is hideously arcane and just this side of f*ckf*ck for usability and breadth of distribution. </sarcasm>

      You know, there are still a lot of people programming in Delphi. Many are not in the English-speaking world (Brazil and Russia seem especially strong), so they don't show up here, but they exist. And a hell of a lot of people learned programming in Pascal, before Java became the standard in universities and colleges.

  23. Nine months. by Anonymous Coward · · Score: 0

    Summary says this change happened it January. It's October, and you've only now noticed?

    Mustn't be impacting too many people.

  24. The solution is easy (according to TFS) by uassholes · · Score: 1

    Just don't use Microsoft Visual Studio 2005. Seriously, just use make. What's the problem?

    1. Re:The solution is easy (according to TFS) by Narmi · · Score: 1

      Just don't use Microsoft Visual Studio 2005. Seriously, just use make. What's the problem?

      make is not a compiler.

    2. Re:The solution is easy (according to TFS) by uassholes · · Score: 3, Informative

      Neither is Microsoft Visual Studio 2005.

    3. Re:The solution is easy (according to TFS) by shutdown+-p+now · · Score: 1

      It is, actually - as a suite, it does include a C++ compiler as one of the bundled products.

  25. Re:Why don't apps just use their own copy of the . by bit+trollent · · Score: 1

    Those are definitely good points. The security aspect of it really deserves close attention. At the end of the day you have to weigh the benefits and drawbacks you describe against the possibility that patch Tuesday could kill your application on every computer it is installed on.

  26. Additional reading by QuoteMstr · · Score: 4, Informative

    Everyone (even Windows programmers) should read Ulrich Drepper's piece on how to write shared libraries. (Warning: PDF.) (Likewise, even free software developers should read Raymond Chen's blog.)

  27. Re:Why don't apps just use their own copy of the . by David+M.+Andersen · · Score: 1

    Actually that was a big problem with the GDI+ library a few years ago. People have even written their own vulnerable DLL scanners for this sort of thing.

  28. Then don't bother by OrangeTide · · Score: 2, Insightful

    everyone having their own DLL would be the same as just statically linking everything. you'd have tons of code duplicated and loaded. have no easy way to patch common code system wide.

    People suffer DLL hell because it is better than not using DLLs at all.

    --
    “Common sense is not so common.” — Voltaire
    1. Re:Then don't bother by QuoteMstr · · Score: 1

      everyone having their own DLL would be the same as just statically linking everything. you'd have tons of code duplicated and loaded. have no easy way to patch common code system wide.

      Actually, using private, but separate DLLs is much better than static linking. First of all, if there's a vulnerability, it's much easier to find the vulnerable code.

      Also, just to play devil's advocate, private DLLs don't necessarily require more memory and disk use. it'd be possible for the operating system to notice two applications are using identical versions of a DLL and to share their pages, even if the two applications are using DLLs that reside in separate files. That'd help on the memory pressure front.

      The operating system could even statically link identical copies of the same DLL (or use a copy-on-write approach) to cut down on disk use.

    2. Re:Then don't bother by zuperduperman · · Score: 1

      > everyone having their own DLL would be the same as just statically linking everything.

      It's still marginally better to use a DLL.

      If someone runs multiple instances of your app, it will only load the DLL once and the two instances will share the code. Windows may even keep the DLL mapped into memory between runs, so it is faster to load even if you are just closing and relaunching single instances of the app (not 100% sure about this). It's especially nice if your app actually consists of a bunch of executables - each one can just be a tiny shell (10 KB) that does nothing other than invokes the single DLL with a different call. You save memory, startup time and space.

    3. Re:Then don't bother by OrangeTide · · Score: 1

      static linking removed unused portions of code, reducing memory usage. dynamic linking requires certain amounts of reserved address space for mapping in, and various tables to allow for the operation of linking.
      static linking has far less overhead over dynamic linking.
      static linking can support flexible ABIs rather than conforming to a standard, possibly less efficient, ABI.

      Private DLLs, if they all provide the same functionality, is wasteful and requires virtual memory to be mapped to a disk (if your OS supports directly mapping a library file, not all do) or RAM to be allocated to hold a copy of the library.

      For patching there is no difference between 100 statically linked applications or 100 private DLLs. Finding vulnerable code is not any different between the two, both require tests and debug symbols to find the exact link of source where the problem exists. Both applications and libraries have this feature. DLLs adds a layer of indirection to this process and makes it slightly more work, although exceptionally identical.

      you can't really statically link a DLL. the information necessary to do so is gone. You can do what is known as prelinking, this doesn't have all of the benefits. But it does eliminate a disadvantage of a delay when launching a dynamically linked application. Prelinking is common in environments that launch the same application often, or in environments that are trying to reduce their boot-up time.

      If you are going to play devil's advocate, do so when it is prudent and don't waste my time on rubbish.

      --
      “Common sense is not so common.” — Voltaire
    4. Re:Then don't bother by OrangeTide · · Score: 1

      If you load multiple instances of an executable, it will only load the executable once. It's the same thing. Windows PE executables and Unix executables are the same in this (PE format is a lot like a unix binary). Segments are page aligned so they can be mapped into memory. When you run an executable, it does not copy the entire thing off disk into RAM, it just looks at the headers and configures the virtual memory system to demand page the disk files.

      There is almost no difference to what the OS can do with a DLL versus an executable. Both can be cached. Both can be shared with multiple instances. The primary difference a DLL has is with the userspace runtime, where one DLL can be linked to multiple different applications (very useful).

      --
      “Common sense is not so common.” — Voltaire
    5. Re:Then don't bother by QuoteMstr · · Score: 1

      you can't really statically link a DLL

      I meant hard linking, not static linking. Toolchains on the brain. :-)

  29. dead link by petes_PoV · · Score: 1

    hread Ulrich Drepper's piece on [at]http://developers.slashdot.org/people.redhat.com/drepper/dsohowto.pdf ...

    404

    --
    politicians are like babies' nappies: they should both be changed regularly and for the same reasons
    1. Re:dead link by QuoteMstr · · Score: 4, Informative

      Oops. Correct link. (I wish Slashdot would warn about obviously incorrect links.)

  30. They LIED by RonMcMahon · · Score: 0, Troll

    Back when Microsoft was first out selling .NET, one of the big promotions behind encouraging us to move to .NET was the 'end to .DLL Hell'. After listening to a few sessions at the TechEd event where all these sales pitches where happening, it dawned on me that Microsoft was simply replacing .DLL Hell with what could just as easily become .NET Hell. At the day's closing Q&A session I put up my hand and asked the presenters just that question. They agreed, but added, "trust us, we've learned our lessons with .DLL Hell and won't do it with .NET". Obviously the lesson wasn't fully learned!

  31. Security holes for fun and profit by Anonymous Coward · · Score: 0

    Oh, they decided to uninstall the service pack? What could possibly go wrong? Let's check the security bulletin!
    Maximum Security Impact = Remote Code Execution
    Your customers must love you guys!

    Slightly more on topic, if it's totally impossible to distribute any kind of installer with their product, they should just link to the libraries statically. No luck required!

  32. Re:Why don't apps just use their own copy of the . by x2A · · Score: 1

    Not with a .local file.

    --
    The revolution will not be televised... but it will have a page on Wikipedia
  33. A question .... by taniwha · · Score: 2, Interesting

    not having programmed for Windows for many years now what happens when these different versions of library C use different data structures or global variables?

    1. Re:A question .... by zemoo · · Score: 1

      One thing to note is that you generally don't use library C side-by-side unless C's developer intended you, as they're usually the ones to provide the manifest that's used to refer to the library.

      Global variables you'll have two copies of. But in general, you raise a salient point -- library C must be explicitly designed so that two versions can be loaded in the same process. Microsoft actually provides guidelines on how to get there: http://msdn.microsoft.com/en-us/library/aa374238(VS.85).aspx

  34. Re:Why don't apps just use their own copy of the . by Anonymous Coward · · Score: 0

    The advantage of dynamic libraries is that a single patch will fix every application that uses it. In your scenario, say that you find a major security hole in x.dll. In order to patch it, you'd now have to find every program that includes x.dll and update it.

    Take for instance, the CryptoAPI hole mentioned here. If they didn't use the shared library, IE, Safari, and Chrome would each need to release their own updates to fix this problem. Now, we just need to wait for Microsoft to release a single patch and everything is fixed.

    It also would dramatically increase the size of the OS- the same file would have to be on the computer lots of times. That's usually considered a bad thing.

  35. Works as well as I'd expect by Anonymous Coward · · Score: 0

    Installed Visual C++ 2008 Express not too long ago, wrote some code, compiled for debugging, so far, so good. Next step was to run the damned thing, this worked for a while, then mysteriously failed because it could no longer find its own stupid runtime DLLs.

    Actually, this was really easy to solve, All I had to do was disable incremental linking, which should have been obvious to just about anyone

    Links for the skeptic,

  36. Re:Why don't apps just use their own copy of the . by zach_the_lizard · · Score: 2, Informative

    Sometimes it is a good thing to use your own DLLs. I'm writing a mod tool for a game at the moment, and I am using Qt4 to provide the graphics. Qt4 on Windows by default is compiled with MinGW, but I compiled mine with Visual Studio. If I had the Qt4 DLLs in the system directory, it probably would cause issues for any other Qt4 using program that might use those particular DLLs. To be on the safe side, I kept the DLLs in the directory of the program.

    --
    SSC
  37. Remind me again why we want DLL's? by refactored · · Score: 1

    ...why did we ever move away from statically linked binaries?

  38. Would be interesting to solve at another layer by Lemming+Mark · · Score: 1

    I wonder if everybody has looked at using static linking + content addressable filesystem as a replacement for DLLs. Every app would ship with all required libraries linked statically and the elimination of duplicated data would be handled by the filesystem and memory management code so that you don't waste disk / RAM. If you used a suitable protocol you could even save on bandwidth by not downloading file blocks that you already have somewhere on your disk, so the increased executable size would become less of a problem.

  39. Re:Why don't apps just use their own copy of the . by gbjbaanb · · Score: 1

    because it still doesn't work - I tried that to solve one problem with this update.

    Loading dlls now requires manifest files which bind your app to a particular dll version (via some sort of guid), so once you've rebuilt your app, you have to ship the .4053 version of the CRT, ATL and MFC updates to your app's local directory. You might as well install them to the SxS dir, if you have to install them manually anyway.

    They just replaced dll hell (which I never suffered from in all my 15 years of windows development) for manifest hell (which I've suffered from 3 times now). MS used to keep things very backward compatible (users may not have been so conscientious, but whenever I've rebuilt an app I rebuild all my user libs too so I don't have to bother being so careful, but MS used to do a good job so the CRT libs were never a problem).

    You'll find the same issue will affect you, you'll see it if you try to build using (say) .NET with a service pack, but the user doesn't have that update installed. Its only a poorly documented patch that doesn't have the redist package on WU yet, which is why this is such a problem.

  40. Hash collisions by QuoteMstr · · Score: 1

    Content addressable systems are a bad idea: consider hash collisions. In normal use, hash collisions are extremely unlikely. However, with billions upon billions of data blocks being checked by hash, the odds of a collision go up drastically, and you end up getting the wrong data. Occasional data corruption is never acceptable for conventional filesystems, so why should it be acceptable for content-addressable ones?

    1. Re:Hash collisions by Lemming+Mark · · Score: 1

      True, though it depends on how frequent "occasional" is.

      I'd expect that using a big enough hash value would make the probability of corruption due to collisions less than the probability of corruption due to cosmic rays hitting your RAM / whatever, which could affect any filesystem. If "occasional" corruption was "once in a hundred years" that'd be acceptable to me as the storage I'm using is less reliable than that. Some would want a larger hash value.

      The git revision control system (not that I'm a huge fan of it) is actually content addressable in this way (not sure what, if any, checks it does to detect collisions) and is used successfully for large scale development. As far as I know they haven't had problems with collisions.

      Gets more thorny if you start introducing an attacker though, since every time a crypographic hash gets broken you'd need to worry about deliberate collisions, rather than randomly occurring ones. Which would leave you looking at rewriting all the data on your filesystem with a new hash. Erk.

      The conservative but post-hoc solution would be to have scrubber processes identify duplicate disk and memory areas and unify them in storage to save space. There's been talk of having btrfs support duplicate block elimination, I think. And code went into Linux recently to unify in-memory pages (for the benefit of KVM guests but presumably it could be applied to other processes too). It's a bit ugly doing it that way but at least you can guarantee it works. Question is whether it'd be worth it. I wonder whether it would perform better or worth than a content addressable system in the end.

    2. Re:Hash collisions by rcolbert · · Score: 0

      Hash collisions are FUD spread around by IBM, who happened to buy the only deduplication company in existence that doesn't rely upon mathematics to compare signatures. Most deduplication uses multiple, independent algorithms to verify uniqueness. There has never been a confirmed instance of a hash collision on a deduplication system that uses independant algorithms. In the meantime, there are lots of other ways to lose data on a hard drive, not the least of which is the combination of a weak filesystem coupled with an OS prone to crashing (but I'm not naming names.)

      I don't always agree with Curis Preston, but I think the hash collision FUD has effectively put to rest here. http://www.backupcentral.com/index2.php?option=com_content&do_pdf=1&id=145

    3. Re:Hash collisions by Kjella · · Score: 1

      Content addressable systems are a bad idea: consider hash collisions. In normal use, hash collisions are extremely unlikely. However, with billions upon billions of data blocks being checked by hash, the odds of a collision go up drastically, and you end up getting the wrong data.

      No, that's pretty much the default functioning of hash functions, being used to check billions upon billions of data blocks each day...

      --
      Live today, because you never know what tomorrow brings
  41. Re:Why don't apps just use their own copy of the . by edxwelch · · Score: 3, Interesting

    I hate to break it to you, but there is quite a lot of this going on. For instance, if you were to look at the source code of every app that needs to decode png files (just as example), you would probably find only about 50% use the libraries that come with the OS, and the reasons why vary:
    * avoiding dll hell (as mentioned)
    * the app is cross platform
    * poor implementation of official dlls
    * politics (at one stage Microsoft made tied certain dlls to the installation of IE, even though they had nothing to do with browser functionality)

  42. ** MOD PARENT UP ** by Fulg · · Score: 1

    I can't believe that the one post that gets it is an AC. Someone please mod him up!

    This whole situation is a complete non-issue. Some amateur coder had a bug and made a blog post about it, big deal.

    One of the earlier things I learned in this profession (yes I write code for a living): as a normal developer, it is very very rare that you will stumble on a bug or design flaw in your OS or compiler of choice. Now I'm not saying it doesn't happen, but the correct gut reaction is to suspect your stuff, not blame your OS/compiler/tools/vendor.

    To the AC: you should really register!

    --
    gcc: no input sig
  43. You sir are part of the problem! by fluffy99 · · Score: 5, Insightful

    Microsoft did this intentionally. They deprecated the vulnerable version of the dll. You "solution" to the problem of your customers still running the vulnerable version of the VC dlls should be to either force them to upgrade or install the new dlls for them. Instead you decide the security is a hassle and undo the fix on your developer machine, so you can ignore the larger issue that you are building insecure software and you customers are running insecure computers. Fix the problem, instead of whining about it and continuing to crank out crappy .net software. How hard would it be to have your software check for the problem dll versions, and direct the customer to download/install the new version? Cripes, games do it all the time when they check what version of direct x is installed.

    1. Re:You sir are part of the problem! by QuickBible · · Score: 1

      I have experienced this problem directly in my Visual C++ work. I work in the Win32 / MFC / ATL world. My solution was to upgrade my system DLL's as recommended and then change my projects to link statically to the M$ import libraries. This will save me doubly. First of all, it allows my colleagues to continue testing the work without upgrading. Secondly it allows me to bypass deploying the VS2005 runtime from my installer. I get some front end bloat in my executable but reduce the larger back end bloat in the installer. So far I am satisfied with this solution.

    2. Re:You sir are part of the problem! by fluffy99 · · Score: 1

      Statically linking the libraries is a usable fix to get rid of the dependency problem. The funny part is that he obviously doesn't pay attention to the comments on his blog writeup of the problem, as the very first comment told him how to fix it.

      Me thinks this is a case of the poster, not truly understanding his options or the underlying problem, immediately blaming MS rather than figuring out a solution.

    3. Re:You sir are part of the problem! by Anonymous Coward · · Score: 0

      You are aware that the security flaws and fixes in question affect ATL, but the patch also affects programs that only use the Visual C++ runtime library, right? There is a lot of collateral damage from this patch.

    4. Re:You sir are part of the problem! by shutdown+-p+now · · Score: 1

      The patch doesn't affect users in any way - their applications keep running as they always did.

      The patch only affects developers, in that after installing it, if they rebuild their application that links to VC++2005 runtime, it will now require a new version of that runtime (which the patch brought in), and they will have to push it to the clients as well.

      Presumably this shouldn't be a problem at all, because they had to push the original version of the runtime when they first released the application (since there's no guarantee that any Windows user will have VC++ runtime on his machine already, even though most do). There are well-documented and widely known techniques of doing that by writing proper installers. In fact, in VC++2005, when creating a "Setup project", it will add the correct version VC++ runtime as a dependency to include in the generated MSI automatically. Virtually all installer generators have similar features to automatically detect dependencies; at worst, it would involve manually checking that one "I use VC++ runtime" checkbox somewhere.

      So the only collateral damage from the patch is to developers who weren't following the recommended development practices that they should have learned before writing Windows applications in the first place (and which prominently feature their own section on MSDN).

    5. Re:You sir are part of the problem! by Anonymous Coward · · Score: 0

      How hard would it be to have your software check for the problem dll versions, and direct the customer to download/install the new version?

      It's even easier than that to get dynamic linking to work correctly. They should have been shipping the VC library merge module in their installer from the beginning, then when the update was applied to the dev (and build) systems, subsequent updates of his application would require the newer SxS and (most importantly) the rebuilt installer would have contained the updated VC redistributables automatically. No explicit version checking on the target system, no customization at all, just include the appropriate MSMs in the installer. It's spelled out plainly in "best practices" docs, and VC2005 couldn't make things like this any easier. IIRC, a new installer project contains the MSMs by default, so he almost certainly removed them to cause the problem.

      This is an uninformed developer complaining about problems caused by his own ignorance. It's all well and good to remove things from a VS wizard-generated project (installation or otherwise), as long as you know what you're doing.

      - T

  44. Audio Surf by Secret+Agent+Man · · Score: 1

    Does this explain why Audio Surf suddenly pops up roughly a dozen Visual C++ Runtime Error messages before actually starting? I thought it was the latest update to Audio Surf that was causing it, but it could very well be this...

  45. IT'S ABOUT TIME IT'S ABOUT SPACE by Anonymous Coward · · Score: 0

    It's about time
    It's about space
    About strange people in the strangest place
    It's about time
    It's about flight
    Travelin' faster than the speed of light

    About space people and a brave crew
    As through the barrier of time they flew
    Pass the Roman Senators
    Pass an armored knight
    Pass the firing Minutemen
    To this modern site

    It's about time for you and me
    To meet these people of amazing feats
    It's about two astronauts and how they educate
    A pre-historic woman and her pre-historic mate

    It's about time
    It's about space
    About strange people in the strangest place
    They will be here
    With all of us
    Dodging a taxi a car a bus

    Where will they go
    What will they do
    In this strange place where everything is new
    Will they manage to survive
    Watch each week and see
    Will they get accustomed to the Twentieth Century

    It's about time
    For our good byes
    To all our pre-historic gals and guys

    And now
    It's About Time ...

    Time to load is dimiinished because often the DLL is already loaded
    Spaec since you only need one code to be loaded (data is always separate, unless shared segment)
    In summary, static linking is better today, but the default is to use /MD so DLLs will be used by most (because they know no better).

  46. have you ever looked at open source code? by Anonymous Coward · · Score: 0

    go into any open source app. chances are quite good they have just listed a huge piece of the source tree of sublibrary xyz version pdq and dropped it into their project. why? because they are sick of the library not being available or being the wrong version. not only for running, but for compiling... and getting other people to be able to work on the project with them.

    another 'interesting' example is firefox, which has its own , basically, everything, from a string library on it (of course.. in the old days,, it actually had --two string classes--.

  47. thank you! by aahpandasrun · · Score: 1

    I just ran into this at work last week. I'm glad it's finally making the tech sites!!

  48. Re:Why don't apps just use their own copy of the . by Anonymous Coward · · Score: 0

    ... However, Microsoft's failure to document their operating system's API thoroughly in a public manner led to developers relying on undocumented features that were later changed. ...

    Isn't the definition of "undocumented" not documented? And therefore, it shouldn't be used, as the providers don't guarantee that it won't be changed. You can't blame Microsoft for developers using undocumented functions: that was the point!

  49. Is the OP not doing something wrong? by tjstork · · Score: 2, Informative

    First off, why on earth is the developer still using Visual Studio 2005? We're on Visual Studio 2008, SP1. That, right there, raises a red flag. If someone compiled something with an ancient version of gcc and found out it didn't work, when distributed, on more up to date Linux distributions, wouldn't you think that the appropriate response would be for our man to get his tools straightened out first?

    I would think that if the author shipped his system with a copy of the runtimes and had them install in his application directory, he would have no problem at all. The Windows DLL load order is application directory first, then, some other stuff, so his application should always have the right libraries, if he shipped them. In fact, I even think there's some sort of a doohickey that you can do to have Windows look for COM components first in your own directory before it looks for them in common areas. There's no need to have "DLL hell" at all, unless the developer really asks for it.

    Frankly, I doubt DLLs of the relatively small size of the CRT should even be used any more across different applications from different vendors.

    1. First, you cannot possibly test your application with all the different versions and patch versions of DLLs that are out there, because patch releases now are way too fast. Reliability, right now, not performance, is the pre-eminent problem in the software community.

    2. The static linker is now actually capable of removing unused code, from an image, it could not do that before.

    3. DLLs have to be relocated when an application loads them into its own process space, so you take a performance hit there.

    4. The Windows API has 95% of what you would need the C runtime to do. This isn't like Linux, where, you would die without libc trying to make heads or tales of syscalls and what not. On Windows, I struggle to think of a CRT call that could not be done nearly as simply as in SDK directly. For files there's CreateFile, WriteFile, etc. All of the basic string functions exist within the SDK, and the stuff to display formatted strings in the SDK is better than what the CRT gives you anyway. It's a bit more involved, but, there's articles out there on how to not have a CRT at all. In fact, applications that use the ATL and WTL frameworks even support not having the CRT code, just so you can write really, really tiny applications and gasp, COM components.

    --
    This is my sig.
    1. Re:Is the OP not doing something wrong? by JSBiff · · Score: 3, Interesting

      "The Windows API has 95% of what you would need the C runtime to do."

      Unless what you need the C runtime to do is to be cross-platform compatible. Then it has 0% of what I need the C runtime to do. The reason to have a standard c library, at all, was to make applications significantly more portable. That's why it's, I believe, part of the ANSI and ISO specifications of C, is it not? Sure, any vendor can create their own proprietary, non-portable, runtime library. I'm sure Microsoft would be delighted for you to use CreateFile, WriteFile, et al., because you've now tightly bound your C application to Windows. Of course, sometimes that's fine. Sometimes your app will be tightly bound by other things like DirectX, anyhow, so, might as well go native API's all the way.

      But, if I'm using the C runtime library, it's because I'm trying to write portable code.

      Wasn't one of the original goals of DLLs was to avoid lots of duplicate copies of the same runtime libraries littering up the hard drive, and RAM? It's my understanding that one of the 'advantages' of a DLL is that you could have 5, or 10, or 20 programs running, and they could all 'share' one copy of the DLL loaded in RAM? That if the DLL was already loaded in RAM by another program, it would also save a little bit of time that otherwise would have been required to load the DLL from disk, etc? I suppose, however, that since both hard drive space and RAM have gotten orders of magnitudes larger, faster, and cheaper than in the past, perhaps, for the sake of reliability, it does make sense to just go ahead and sacrifice some efficiency, as you suggest, by either having every program install their own directory-local copy, or even statically link.

    2. Re:Is the OP not doing something wrong? by Anonymous Coward · · Score: 1, Informative

      I would think that if the author shipped his system with a copy of the runtimes and had them install in his application directory, he would have no problem at all. The Windows DLL load order is application directory first, then, some other stuff, so his application should always have the right libraries, if he shipped them. In fact, I even think there's some sort of a doohickey that you can do to have Windows look for COM components first in your own directory before it looks for them in common areas. There's no need to have "DLL hell" at all, unless the developer really asks for it.

      VS2008 automatically adds a manifest that requires use of SxS. You don't get around it by simply copying the dlls you want to use into the app directory.

    3. Re:Is the OP not doing something wrong? by Sycraft-fu · · Score: 1

      Well yes and no. Yes originally that was part of the reason. However that wasn't the only reason. Another reason is so that people could release libraries under different licenses and others could still use them. LGPL would be a good example. Also you might release a DLL that is totally closed source, you document its interfaces but don't allow people to actually have the code. There's also the fact that it allows for software to ship compatibility DLLs if needed, since not all systems have all features. A good example would be OpenAL. My system has openal32.dll in the system directory since I have a soundcard that handles OpenAL in hardware. You speak OpenAL to it, it'll directly accelerate it, bypassing the Windows sound handling. However a lot of people don't. So, games that use OpenAL ship with an openal32.dll that emulates the functionality in software, via DirectSound.

      These days it is as you suggest in terms of trading resources for stability and has been for some time. All programs get their own copies of a DLL, even if it is the same DLL on the disk. The SxS thing just takes this to the next step and keeps separate versions of the DLLs.

      To me, it makes sense. RAM is cheap and disks are amazingly cheap. If a solution uses more of those for less problems, it is a good solution. I am not interested in saving 10MB per app because of DLL sharing when I have 8GB in a system for less than $200.

    4. Re:Is the OP not doing something wrong? by moonbender · · Score: 1

      First, you cannot possibly test your application with all the different versions and patch versions of DLLs that are out there, because patch releases now are way too fast. Reliability, right now, not performance, is the pre-eminent problem in the software community.

      No. Security has been the pre-eminent problem, then reliability, then performance.

      --
      Switch back to Slashdot's D1 system.
    5. Re:Is the OP not doing something wrong? by lennier · · Score: 1

      "I am not interested in saving 10MB per app because of DLL sharing when I have 8GB in a system for less than $200."

      You might. I only have a gig in mine.

      Not all of your userbase wants to upgrade their hardware every year.

      --
      You are not a brain: http://books.google.com/books?id=2oV61CeDx-YC
  50. You should do some googling by Anonymous Coward · · Score: 0

    Side-by-side assemblies are not static linking. Quite the opposite, they allow dynamic linking of multiple versions of the same DLL. In other words, only one copy of the old libraries exists, and they are most definitely not in the binary.

  51. I... LOVE... THIS... COMPANY! YEAH!!!! by Anonymous Coward · · Score: 0

    Who said, "Sit down!"?

  52. Re:Why don't apps just use their own copy of the . by Malc · · Score: 1

    This isn't an issue looking for a fix. The answer is to install the latest VC5 redist when you install the new build of your software. It's backwardly compatible with the previous version, and fixes the massive security hole. The person who posted this story is totally missing the point and making a mountain out of a mole hill. The real issue is that people aren't patching their computers.

  53. Meanwhile in Gentoo Linux land... by Hurricane78 · · Score: 1

    ...I have yet to see and DLL hell or dependency hell.

    I'm by far no Gentoo fanboy, but I think the slotting works very nicely. I even have KDE 3.5.10 and 4.3.1 side-by-side without problems.

    I wonder why they don't just create a ports/portage/paludis-like clone for windows...

    --
    Any sufficiently advanced intelligence is indistinguishable from stupidity.
  54. uh by smash · · Score: 1

    Sounds like a lot of "waah" to me - user installs updated security fix from windows update, problem solved? I see this is a good thing as you'll need to get those shitty old insecure copies of the DLLs up to date?

    --
    I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
  55. WinSxS Folder is huge by slaingod · · Score: 1

    My problem with SxS is that the winsxs is taking up 12GB on my 80GB SSD with no easy way to move it.

    --
    http://blog.slaingod.com
  56. Suspect it's MSFT by os2fan · · Score: 1

    It's interesting that the bulk of the SxS stuff is Microsoft stuff, not third party stuff.

    I recall that when Win95 first came out, and that they were replacing the Win16 stuff with Win32 stuff. Someone remarked that there would be incompatibilities, and that it was for the vendor to rewrite the apps to meet the new APIs. That calling some DLL by name would of course these incompatibilities.

    I thought how silly. Inviting third parties to use routines in your DLL is pretty much a kind of contract of support. This is the nature of the operating system, really. If you create a DLL like VBRUN100 for some set of apps to call, then the App expects it to run in that way, and if your new version of VBRUN would cause incompatibility, you should give it a different name, like VBRUN200.

    Last time i looked, routines like VBRUN100, BWCC etc, comes to about 9 MB. (There's a download that ye can add to your OS to give these as preinstalled.

    Where the problem comes is when some sort of obvious name gets used for different DLLs (eg the three different versions of THREED.VXD that different applications were loading under Win31), or the MFC3xx DLLs where the source code was given to vendors to allow them to add their own functions. (good lord). Even so, Microsoft continues to release DLLs like MSVCRT and MFC40, updated to their latest operating system / compiler.

    I don't think anyone else uses such nonsense as SxS or DLL hell: OS/2 VREXX.DLL or EMXRT do the right thing: preserve existing functions, and have a test for version-level.

    --
    OS/2 - because choice is a terrible thing to waste.
  57. oh yeah, that "simple suffix notation is great..." by Anonymous Coward · · Score: 0

    I really love having to edit various _PATH environment variables and make a thousand symlinks whenever an application doesn't specify exactly which version it wants, since nothing is automatically detected and "simple" means "complete lack of standardization, so it's impossible to determine what is actually desired"

    Here's a crazy idea:
      - digital signatures are a good thing
      - precedence by PATH order was always a stupid idea.

    Why the hell do we need to tell anything WHERE to look nowadays, instead of saying --require-compatible-with=SOMEKEY?

  58. Resolving some confusion by Myria · · Score: 1

    In reading this post, I'm trying to understand what is being complained about. In my understanding of the situation, having handled this update for my employer's projects, this is what happens:

    You release version 1.0 of a product using VC 2005 SP1 before the update. Version 1.0 therefore depends on version 762 of the DLL.
    You install the security update on your build machine.
    You release version 1.1 of your product as an update. Version 1.1 depends on version 4053 of the DLL because it was compiled on a build machine with the security update installed.
    Your customers install version 1.1 of your product without installing the runtime update from Microsoft.
    The program doesn't start because customers don't have the version that 1.1 depends on, 4053.

    The same thing occurred when SP1 was released, yet there weren't many complaints then. I think it's more of a lack of education on how this DLL versioning stuff works. It was widespread knowledge that SP1-compiled programs needed a newer runtime. My employer's product doesn't even embed the DLL installer (vcredist_x64.exe); instead, we just dump the raw files and .manifest file into the application's local directory. Interestingly, even though the 762 DLLs are in that local directory, Windows will automatically load 4053 from the WinSxS directory if you have the security update installed.

    The moral of the story is if you install the update on your build server, you need to have your customers update as well. Do the right thing and have your update program install it for them, or alternatively shove the files into the local application directory for the same effect.

    --
    "Screw Sun, cross-platform will never work. Let's move on and steal the Java language." - Visual J++ Product Manager
  59. Re:Why don't apps just use their own copy of the . by Anonymous Coward · · Score: 0

    Microsoft's fault that people use undocumented features that then later change?

    Interesting logic.

    Ever thought Microsoft had good reason to keep them undocumented, like, you know, that they knew they were going to have to change them later on? Fair play if something is wrong with the documented APIs, but it's hardly Micrososft's fault if someone uses an undocumented API and it gets changed.

    Contrary to popular belief, Microsoft don't refuse to publicly document some of their APIs to be dicks. They do it because it costs them money to ensure documentation is fit for the public, because it requires that they are confident the API is stable and will not be changed, but most importantly in the last case, because it can take time and lots of money and lead to delays in releases to get those APIs in a stable fit for public state. If doing that offers them little benefit financially because only a fringe few developers need those hidden features why delay their operating system releases costing them millions and hence up the costs for everyone else?

    If an application relies on undocumented APIs it's an application I would not want on my network because it's clearly badly written. People who write this type of software tell us there's no other way to do what they want, but that's always bollocks because there is, you can even use the well documented device driver API if you want to create virtual devices and that sort of thing.

  60. Yep by Sycraft-fu · · Score: 1

    That's the reason for the existence of the virtual store in Vista/7. The problem is that some apps write data to their directory in program files. They were never supposed to since like Windows 2000, but they do. Those of us that administer Windows in a domain setting where people have limited user accounts encountered the problem long ago. Ok well the new security model makes everyone a limited user via UAC. That breaks apps. So MS had two choices:

    1) Break lots of apps. Require users to know how to change permissions on directories to fix it. That would never happen, users would instead turn off UAC and declare that "MS broke my software."

    2) Add a compatibility feature, so that apps would think they were writing to their directory, but file security was maintained transparent to the user. That is what they did.

    Also OSS has plenty of bad programmers. Library hell can be way worse than DLL hell ever was. Recently one of my coworkers was installing a program for our Linux systems. It's installer bombed out on needing a certain version or greater of a library that it didn't include and wouldn't go get. So my friend goes and gets the new version from the site. No love, thing still bombs. So he goes and tracks down the specific version it asks for, which wasn't easy. Still no love. He goes and looks in the make file and finds out that the check is broken, it'll never install no matter what version he has. So he just disables that and goes on to install the program (there were other problems as well).

    That is not a better situation. While MS's solution might take up more disk and memory, those things are cheap. You can get 8GB of RAM for $130, a 1TB drive for $90. As such it doesn't matter, if it makes computers easier to use for the average user, it is a better idea even if it takes some more resources because resources are cheap.

    As you've said, there are lots of stupid programmers. Windows has them, and Linux has them (and people who don't think Linux does may themselves be stupid programmers). It is a fact of life we have to deal with and I do not see it changing. As such, OSes should do what they can to deal with it.

  61. The real problem isn't SxS itself... by nurbles · · Score: 1

    ...the real problem is that Microsoft failed to include the CRT and MFC updates for machines that do not have the development environment installed. So all of our customers that faithfully use Windows update got only the .NET patch instead of all three parts of this release. That "breaks" the software we non.NET developers deliver and that happened without any significant notice to the developers. We get things labeled "security patch" all the time, so many that few of us read all of the details any longer.

    I believe that Microsoft could have included a one time message in the Visual Studio patch that opened a message box the next time the IDE (or just the compiler/linker) was run that explained that the redistributables had been changed and would be required for any customer using software compiled after the message box was displayed. SOMETHING would've certainly been better than NOTHING to inform developers of the change clearly, without any ambiguity. Especially for anyone who allows Windows to automatically update while they're asleep (something Microsoft recommends)!

    While the side-by-side system is a PITA, it isn't the actual culprit here. The primary issue is Microsoft's failure to adequately inform developers of a change that will significantly impact the software being built with their products.

  62. The most important concept in WinSxS by Omni-Cognate · · Score: 4, Informative

    Hands up anyone who knows what an "activation context" is! If you don't you have no idea what WinSxS does, how it does it or how to diagnose it when it goes wrong.

    In my opinion, WinSxS is a good mechanism, or at least as good as Microsoft could have made it while working within the constraints of history. However, WinSxS cannot be used in the real world without properly understanding it, and achieving that understanding is very painful indeed. The MSDN documentation is piecemeal, appears incomplete and inaccurate in a few places and lacks a proper overview. I think the only reason I properly twigged what activation contexts are about is that I had recently written a mechanism that operated on similar principles (a thread-local stack of context-related information).

    I wrote a Wiki page at work describing what (I think) WinSxS's motivation is, how it works and some of the problems it suffers from. I'd like to put it somewhere on the public internet - any suggestions? It should ideally be somewhere wiki-like where people can correct its inevitable inaccuracies without me having to maintain it, but I'm not sure it's appropriate for wikipedia.

    --

    "The Milliard Gargantubrain? A mere abacus - mention it not."

    1. Re:The most important concept in WinSxS by dr_dex · · Score: 2, Insightful

      Put it in stackoverflow.com as a question. And then just answer it yourself.

      --
      Robin Smidsrod Certified Linux Administrator
    2. Re:The most important concept in WinSxS by Omni-Cognate · · Score: 1

      Perfect. It should be there later today.

      --

      "The Milliard Gargantubrain? A mere abacus - mention it not."

    3. Re:The most important concept in WinSxS by truthsearch · · Score: 1

      I wrote a Wiki page at work describing what (I think) WinSxS's motivation is, how it works and some of the problems it suffers from. I'd like to put it somewhere on the public internet - any suggestions?

      Yes, DocForge. I would start by adding a new link or section to the Windows page. Feel free to contact me on my talk page if you'd like any help.

    4. Re:The most important concept in WinSxS by Omni-Cognate · · Score: 1

      I ended up creating a blog for this: Everything you Never Wanted to Know about WinSxS. It's too long for stackoverflow, but the docforge suggestion sounds interesting...

      --

      "The Milliard Gargantubrain? A mere abacus - mention it not."

    5. Re:The most important concept in WinSxS by ascari · · Score: 1

      Let's see if I got that right: So thanks to WinSXS DLL Hell in essence is really more like DLL Heck and we should all sleep better now?

  63. Isn't SxS just more than required. by jabjoe · · Score: 1

    I really don't see what's wrong with just putting a interface version in the filename. It's simple and clear.

    Change the version part of the name of the DLL if you are changing the interface. If you are not changing the interface, you want applications to use the updated DLL.

    I really don't like the manifest. It seams to me an attempt to prevent programmers doing stupid things, but by stopping people doing stupid things, you stop them doing smart things too. Also, who want stupid programmers!? ;-)

  64. huh? by reiisi · · Score: 1

    I really should do some research first, but let me see.

    The public key signatures are in bundled (as in bundled but separate from) files.

    Okay.

    Unbundle. Patch the binary. sign it with a key stolen from a lax developer somewhere who happened to load a porn reader that happened to contain a little eavesdropper on an older machine and then used that machine to sign his own work. (If you're only a little bit lucky, it was a Microsoft internal developer that did that.)

    Bundle.

    Most users are not going to know the difference. They'll see your "Click me if you believe in fairies!" dialog and click, and you're in.

    And that's doing things the hard way, to cover your tracks a little more carefully.

    Dependencies?

    You can't manage versions that way. It doesn't work unless almost all your apps are from a very small number of sources. I mean, small, as in Microsoft plus two, maybe three others.

    There's a graph parsing problem in here that just gets way out of control when you have signatures from very many sources.

    So, no. Microsoft fails yet again, and this time Moore is no longer going to be able to bring the cavalry over the horizon. Maybe, I suppose, if you have an eight processor box and devote 7 of the processors to untangling the dependencies and checking the signatures, but then there are the race conditions.

    --
    Computer memory is just fancy paper, CPUs just fancy pens with fancy erasers; the 'net is just a fancy backyard fence.
  65. Side by side incompetency .... by unity100 · · Score: 1

    every time microsoft pulls some shit, there are fanbois who are defending them as if there is no tomorrow. but still, i wonder if there is any 'side by side' fanboi left to defend them after all the incompetency and stunts they pulled in the last year.

  66. requisite joke by room101 · · Score: 1

    microsoft: 2004 called and we want our IDE back.

    translation: buy a new one?

    --
    room101 -- how much can you stand before they break you?
    (they always break you eventually)
  67. Re:It's not always backwards compatible by Anonymous Coward · · Score: 0

    I guarantee you the latest VC5 redist isn't fully backwards compatible. Specifically, it is not bug for bug compatible and some software relies on bugs in earlier versions. Why do you think wine developers are having so many problems?

  68. fuck brainfuck by Tetsujin · · Score: 1

    What is so special about Brainfuck anyway?

    Yes, a Brainfuck program looks weird, but the language is so simple that any (somewhat competent) programmer can understand it completely after 5 minutes of research.

    It's kind of somewhat interesting, I guess, in that it's a fairly Turing Machine-ish language. You have the current memory location, which can be incremented or decremented, and a very small set of operations you can perform on the value stored there (increment or decrement, zero-test with conditional branch, input, output) The set of operations is simple enough to understand - but actually putting them to use would be a challenge. I can sort of vaguely see the appeal here - the language itself is like a puzzle.

    At the same time - I can never quite shake the feeling that these "Esoteric" programming languages are just complete junk... Like someone decided obfuscated C wasn't sufficient for their needs, so they created a language that could give them new and exciting ways to make programs hard to write and read... I could sort of envision the process of writing something vaguely complicated in Brainfuck - building up bits of functionality out of the barest instruction set and assembling it into a program with the annoyingly limited set of flow control operators - but I can't think of why I would want to do that. If I took on a somewhat similar challenge by, say, writing PIC assembly code - I'd be starting from a better instruction set but still have a lot of work to do in order to create something useful - but the difference is, at the end, my program would be useful... It's like, have I got so much time on my hands that I need programming to be more difficult for no good reason? Couldn't I be doing something more interesting with my time than writing really simple programs in a language that makes these simple ideas almost impossible to express?

    --
    Bow-ties are cool.
    1. Re:fuck brainfuck by daVinci1980 · · Score: 1

      That whooshing sound you hear all the time? That's every joke ever told rushing past you without any sort of comprehension on your part.

      Brainfuck, whitespace, etc? These are all jokes. You're never intended to use them at all.

      --
      I currently have no clever signature witicism to add here.
  69. Re:fuck brainfuck, and also you. by Tetsujin · · Score: 1

    Brainfuck, whitespace, etc? These are all jokes. You're never intended to use them at all.

    As jokes, they're not especially funny. So I guess whether you regard them as jokes or as programming languages, they're equally worthless.

    So pack up that "whoosh" shit and fuck off.

    --
    Bow-ties are cool.
  70. it didn't come out in January -it came out in July by Anonymous Coward · · Score: 0

    the patch actually came out at the end of July, not in January. And the workaround that is mentioned in his blog post (missing a URL link) that Ted authored is here:

    http://tedwvc.wordpress.com/2009/08/10/avoiding-problems-with-vc2005-sp1-security-update-kb971090/

  71. Don't like SxS at all by Anonymous Coward · · Score: 0

    What's the difference if it's 1000 SxS bytes or 1000 static bytes?
    At one point they merge into one, especially when a system like SxS seems to promote sloppy programming, and the creation of thousands of variations.

    I've personally witnessed people buying brand-new Vista-laptops, and their winsxs partition expanded to 15-20 GBs, rendering just a tiny part of the 40 GB harddrive for music and video. These were not technical inclined people, but when told about this "feature" eating up their precious harddrive space all the time, they wanted XP (Vista seems to be gobbling ALL computer resources - SxS and harddrive space just being one of the issues). (Of course XP would not install on their machine by default - having Sata-drives and all - they had tried)

    And yes, they had tried reinstalling Vista a couple of times.. It only worked for a few months, then space became an issue again because Vista was using the most of it..! And it's not like you can delete ANY of those SxS files, even if they're never in use anymore. You never know when they might come in use, and crash the OS if they're missing.. It's supposed to clean up after a while, but doesn't seem to function as well in Vista as in XP for some reason. Probably because of "improvements" in the code. Bah

    The main thing is that users sees this. They'll just say: My XP worked fine with a 20 GB harddrive, and Vista can barely function with double that!

    Too bad shitty PC laptop manufacturers like Dell doesn't support XP, leaving you with scouring the web for half-broken drivers for your "shiny new" laptop which is now crippled beyond imagination. What kind of companies treat their customers like this? Not a company I will ever buy from - or recommend ever again.

    At least I could turn my Vista-Dell laptop into a XP one, with only minor glitches in the sound driver and other useless driver not working. But any sane person not wanting to waste days on such endeavour would just give up!

    And yes, I know Vista can be made more responsive. Turn off aero. Turn off all useless services. I did ALL that, and almost got Vista "working" sanely. You can't really turn off all the duplicate / "spammy" options in every explorer dialog - worst idea ever to spam users with duplicate choices, instead of just cleaning up all the configs once and for all. But I can live with poor user design, after all, every computer interface is littered with it, or by commercials, even today. But SxS was the "killer feature" that finally made me install XP on a Vista Dell-laptop, and I'm not proud of the result..

    But by all means, lecture us about dynamic linking being the final answer to everything. I'll just continue to use most of my programs as PORTABLE binaries whenever I can find them, thank you! Getting a new machine is as simple as copying a whole subdirectory, and voila, emails, browsing, all my settings, all the way I left it on the other machine, contained in just one directory structure named after the person who it belongs to - simple.

    Of course, I have to spend a little time installing the last junk that is not portable, and configuring the drooling retarded defaults in Windows, but after lots of practice it's almost getting funny... And since I'm using less and less of the "OS" (IE is NOT part of the OS although its libraries are), every year, there's really less for me to configure.

    So all in all, if something is static, I might even buy it. And that's coming from someone who love the idea of dynamic linking, but hate reinstalling, configuring, personalizing everything every time I move between systems. And no, I just want simple directories to copy / backup, no automagic wizards "helping me" move to another system. Especially the "OS" I want as little to do as possible. I don't even want "My Documents", because you never know what programs will do to those directories or what they'll be named next.

    "OS" as a platform is overrated in my opinion while Portable Apps are getting better and better. I havent tried Windows7 but I doubt they're moving completely in the right direction, although it is probably an improvement.

    KISS and goodbye!

    1. Re:Don't like SxS at all by QuoteMstr · · Score: 1

      I've personally witnessed people buying brand-new Vista-laptops, and their winsxs partition expanded to 15-20 GBs

      Those files are hard links to files elsewhere on the system. That 15-20GB is being used elsewhere. If you deleted the sxs directory, you wouldn't get that space back.