Live data from Hacker News

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

blog.nullspace.io

11–20 of 124 posts

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

#11
post #9
post #7

The real news here is that this is considered special. In most other languages, they'd have forked the source, fixed it, recompiled it for their own uses and submitted a pull request or patch. I'm a big .NET fan, but the fact that we have to jump through such hoops to find and fix a bug, and then still have near certainty that we're going to have to reapply the patch for many updates to come, well, that's just a bit…

---Author here--- I should disclose that I actually work for Microsoft, and still chose the hard way. Fuck the police!

> and still chose the hard way

Chose? Unless you work on the team that made that DLL, it's likely you'd be jumping through hoops even internally.

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

#12
post #9
post #7

The real news here is that this is considered special. In most other languages, they'd have forked the source, fixed it, recompiled it for their own uses and submitted a pull request or patch. I'm a big .NET fan, but the fact that we have to jump through such hoops to find and fix a bug, and then still have near certainty that we're going to have to reapply the patch for many updates to come, well, that's just a bit…

---Author here--- I should disclose that I actually work for Microsoft, and still chose the hard way. Fuck the police!

Aren't you allowed to send a git (err tfs) pull request there at least within the company?

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

#13
I did this once with GCC.

"But GCC's open source!" you say.

Well, GCC is next-to-impossible to compile for a target other than the host, especially if the target isn't x86 or ARM; and GCC maintainers insist on precise test cases to vet a bug, even if the issue is immediately obvious from reading the source code and the bug only occurs in certain very complex situations.

(/me looks forward to the day Clang/LLVM becomes the default on Linux…)

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

#14
post #7

The real news here is that this is considered special. In most other languages, they'd have forked the source, fixed it, recompiled it for their own uses and submitted a pull request or patch. I'm a big .NET fan, but the fact that we have to jump through such hoops to find and fix a bug, and then still have near certainty that we're going to have to reapply the patch for many updates to come, well, that's just a bit…

What they're doing here is monkeypatching the language runtime. That's not trivial in most languages, least of all ones which typically rely on a centralized install of that language runtime to function.

The way they did this, only the program that needs this fix is actually using their monkeypatched Expressions library; other code on the same system - other libraries in the same application, even - will continue to use the standard .NET runtime classes. That's a pretty powerful capability, and not one that is necessarily made easier by an open language runtime.

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

#15
post #9

Earlier quoted context omitted.

---Author here--- I should disclose that I actually work for Microsoft, and still chose the hard way. Fuck the police!

Aren't you allowed to send a git (err tfs) pull request there at least within the company?

I've read several places that even Microsoft is not standardized on a source control management, some use tfs, some svn, some git, etc.

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

#16

I did this once with GCC. "But GCC's open source!" you say. Well, GCC is next-to-impossible to compile for a target other than the host, especially if the target isn't x86 or ARM; and GCC maintainers insist on precise test cases to vet a bug, even if the issue is immediately obvious from reading the source code and the bug only occurs in certain very complex situations. (/me looks forward to the day Clang/LLVM become…

Just recently I wrote https://github.com/ikonst/LongPathFix to work around a clang/gcc issue, cause it seemed easier than going through the hoops of building clang for Win32, understanding its code and writing a patch good enough to be accepted.

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

#17

I did this once with GCC. "But GCC's open source!" you say. Well, GCC is next-to-impossible to compile for a target other than the host, especially if the target isn't x86 or ARM; and GCC maintainers insist on precise test cases to vet a bug, even if the issue is immediately obvious from reading the source code and the bug only occurs in certain very complex situations. (/me looks forward to the day Clang/LLVM become…

> Well, GCC is next-to-impossible to compile for a target other than the host, especially if the target isn't x86 or ARM;

You're exaggerating. I had no problems compiling gcc 3.something targeting MIPS-I on an x86 Linux host.

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

#18
post #11
post #9

Earlier quoted context omitted.

---Author here--- I should disclose that I actually work for Microsoft, and still chose the hard way. Fuck the police!

> and still chose the hard way Chose? Unless you work on the team that made that DLL, it's likely you'd be jumping through hoops even internally.

i'm glad someone who works at the company like you was able to enlighten us as to microsoft's internal practices

oh wait

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

#19
post #9
post #7

The real news here is that this is considered special. In most other languages, they'd have forked the source, fixed it, recompiled it for their own uses and submitted a pull request or patch. I'm a big .NET fan, but the fact that we have to jump through such hoops to find and fix a bug, and then still have near certainty that we're going to have to reapply the patch for many updates to come, well, that's just a bit…

---Author here--- I should disclose that I actually work for Microsoft, and still chose the hard way. Fuck the police!

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.
Post reply on HN