
The Folder of God - dleskov
https://www.excelsiorjet.com/blog/support-stories/the-folder-of-god/
======
Ciantic
The poster does not give any blame to who ever came up with this:

> 1\. Right-click on your desktop and select New Folder 2\. Type in or copy
> and paste the following as the name:
> GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} 3\. Hit Enter and the folder
> icon will change to GodMode 4\. Enjoy easy access to all Windows 10
> settings!

I know that the exception came from GetDisplayNameOf handling it incorrectly,
but this whole thing begs the question:

Why is this a good way to do shortcuts?

~~~
woodrowbarlow
the godmode feature is undocumented probably _because_ it's a terrible way to
do shortcuts.

------
marktangotango
Nice write up, I really enjoy these types of postmortems. Also, the best
issues are always ones you can blame upstream for :D

Side note, does anyone have experience using Excelsior Jet to deploy natively
compiled applications or services?

~~~
tannhaeuser
Was about to ask the same. Also wondering how excelsiorjet's business is
going, now that Java has AOT compilation out of the box. Or hasn't it?

~~~
dleskov
Excelsior guy here.

Overall, I would say that AOT suddenly becoming kosher helps our business way
more than competition hurts it.

Then, "JDK9 has AOT out of the box" is a bit of exaggeration. Oracle AOT is
only available for Linux/x64 ATM, yields huge binaries and may be a bit
cumbersome to use: [http://mjg123.github.io/2017/10/04/AppCDS-and-
Clojure.html](http://mjg123.github.io/2017/10/04/AppCDS-and-Clojure.html)

The main difference however is that a binary produced by Oracle AOT is to a
big extent just a pre-populated HotSpot cache, whereas Excelsior JET has been
AOT-centric since day one. In practice that means that with Oracle AOT you
have to ship both the native binary and the original class files to your
customers, and with Excelsior JET you only ship the native binary, which makes
reverse engineering your application more difficult.

I recall us being quite surprised when a customer survey had shown that IP
protection is more important than application performance for many of our
customers, even though it was just a byproduct of our optimization efforts.

~~~
tannhaeuser
Thanks, appreciate the response. I guess Oracle's AOT is only addressing slow
startup times in eg. command-line/batch apps.

------
acqq
> Deleting the God Mode folder fixes the problem, because that is the only
> filesystem object for which GetDisplayNameOf() returns a malformed
> structure.

I wouldn't call it "malformed" \-- the OS simply returned a null pointer: "the
field that is supposed to point to the buffer containing the resulting string
is NULL." Which in C means "nothing there." And the Java native interface code
didn't check for that (it could have returned an empty Java string in that
case), but dereferenced the null pointer instead. "Fail fast" indeed.

~~~
dleskov
Problem is, the God Folder dates back to Vista and it is the Windows 10
Creators Update that began setting that field to NULL. Apparently the author
of that change did not foresee any backward compatibility issues.

~~~
acqq
See my other comment for the details, I believe now that the field was
actually not set to null, the returned structure has a union which is
documented to be able to be of different types. It's surely the type
STRRET_CSTR that wasn't covered by Java, the API is then valid before and
after the update, returning the structure with STRRET_CSTR and zeroes in the
union is valid.

------
nerdponx
At the risk of sounding trite, this reminds me an awful lot of the "Missingno"
glitches in the Red and Blue Pokemon Gameboy games.

------
fhood
Who the hell thought it was a good idea to let _people_ write operating
systems. Asking for trouble if you ask me.

~~~
joombaga
"Let"? Given the limited intelligence of other Earth species, I'm unsure how
else operating systems would've been developed.

~~~
JadeNB
> "Let"? Given the limited intelligence of other Earth species, I'm unsure how
> else operating systems would've been developed.

I suspect that you missed fhood's joke, or else I missed yours.

(It is not unreasonable to suppose that another path to the existence of
operating systems would be the, perhaps human-guided, evolution of
progressively less primitive programs. I am not sure that I'd want to use the
result, but it's at least a conceiveable way for history to have developed.)

