Live data from Hacker News

I found a bug in the .NET framework and fixed it by hand-altering the DLL

blog.nullspace.io

61–70 of 124 posts

Re: I found a bug in the .NET framework and fixed it by hand-altering the DLL

#61

Funny, I had something to do with this code back in the day! I'm guessing it was a copy+paste bug and they copied from the LambdaCompiler, which uses StrongBox for its closed-over parameters[1], since StrongBox .Value is a field. The idea was to have the closures be really fast. The history of ET compiler: it started with LINQ in .NET 3.5. Originally it was pretty simple and just handled expressions. In .NET 4.0 we m…

So, do you think this is Dino's fault? :P

Re: I found a bug in the .NET framework and fixed it by hand-altering the DLL

#63
I know a lot of people here balk at the idea of paying for tooling, but Red Gate's Reflector[1] is absolutely amazing for situations like this. Not only is it a decompiler, but it allows you to decompile at debug-time and step into third party libraries.

Assuming they haven't been obfuscated, this is an extremely useful tool. I've used it to track down a number of issues within Visual Studio itself and within some of the non-open sourced components of Roslyn.

[1] http://www.red-gate.com/products/dotnet-development/reflecto...

Re: I found a bug in the .NET framework and fixed it by hand-altering the DLL

#64

Funny, I had something to do with this code back in the day! I'm guessing it was a copy+paste bug and they copied from the LambdaCompiler, which uses StrongBox for its closed-over parameters[1], since StrongBox .Value is a field. The idea was to have the closures be really fast. The history of ET compiler: it started with LINQ in .NET 3.5. Originally it was pretty simple and just handled expressions. In .NET 4.0 we m…

So, do you think this is Dino's fault? :P

Hah. Or Tomas. Not sure. The S.L.E.Interpreter is after my time :)

Re: I found a bug in the .NET framework and fixed it by hand-altering the DLL

#65
post #19

Earlier quoted context omitted.

For sure, those who complain about Microsoft not being open source are obviously trying to cover the fact that they are bad at reading assembly language.

Obviously?

That's the key word that should let you know an attempt at humor was imminent.

Re: I found a bug in the .NET framework and fixed it by hand-altering the DLL

#66
post #50

Why wasn't the DLL signed? Is this not a thing?

DLLs are signed. But they aren't checked every time a DLL is loaded. It absolutely obliterates load time if you have to go through every byte of all your DLLs and hash them. (You have the option to turn this on within the registry, though)

Signing is almost useless in .Net. And it's certainly not in place for security purposes.

Re: I found a bug in the .NET framework and fixed it by hand-altering the DLL

#67
post #4

My knowledge of the GAC is out of date but isn't a bit of a security hole that you can replace that DLL?

You need to be a local administrator to write to the GAC by default. See http://msdn.microsoft.com/en-us/library/yf1d93sz(v=vs.110).a... So if you can modify the files in the GAC, you're already compromised at that point.

Writing to the GAC is easy, but assemblies in the GAC are strongly-named. Actually replacing one without the private key would require forging a signature, which is what parent was probably referring to. You can give an assembly the same name, but if it's signed with a different key it gets a different strong name (and therefore goes in a slightly different directory).

Re: I found a bug in the .NET framework and fixed it by hand-altering the DLL

#69
post #54

Earlier quoted context omitted.

From good source here: You don't actually jump through hoops. All you get to do is submit the bug, which gets logged in the bucket of thousands of other bugs. Then the PMs will gather for bug triage for the next release, which have to compete with the next shiny project features. Nobody wants to fix bugs that only one developer has. It's just not worth it. This bug has existed for years, and it is likely you could mo…

> Nobody wants to fix bugs that only one developer has. It's just not worth it. … Also, if you fix it, who knows what else will regress. That also imposes a bias towards not fixing these kinds of bugs. This is an interesting cognitive hazard: it's relatively easy to measure the cost of paying a developer to fix a bug and possible to estimate the cost of getting it wrong but there's no way to measure the cost to every…

... Or also never fix anything that we won't be able to sell and make money from (this is, the next shiny thing, whatever it happens to be at the time).

The cognitive hazard is a good observation.

But I think the most important one is the imbalance of interest, which is where open source shines: MS gets zero value from fixing this bug and a lot of value from adding new features, but for this one developer this bug could have been the most important issue on the road to his company's "value" (their own product's ship date).

Re: I found a bug in the .NET framework and fixed it by hand-altering the DLL

#70

In situations like this, you can report the bug to Microsoft Connect: 1. Submit bug report. 2. Wait six months. 3. MS tech will post a comment, "this will be fixed in the next release". 4. Wait two more years. 5. Bug report will be closed as "won't fix".

This. One bug in IE9 clickOnce launching thanks to them changing how download prompting works.

1. Reported to connect whilst in preview release status. Closed. Reported again. Closed. FULL test cases provided.

2. We're a gold partner with a £500k spend a year on licenses. Partner support. 19 hours on the phone over 6 months, blame shifting between the IE and .net teams and a daily call to get the case closed without resolution. Got a registry patch from ass-end support after 4 months that we have to ship to 2000 users at 200 different companies rather than an upstream fix. This checks a check box in the security settings.

They broke their own product and won't fix it. Basically you can't use JS to redirect to a clickonce URL.

Now today, IIS just stopped serving shit with no errors, nothing. Can't get anything out of minidumps+windbg. Just stops. None of our code is running.

Who am I going to call?

Redhat that's who.

Post reply on HN