Forgot your password?
typodupeerror

Comment Re: "memory-safe" (Score 1) 36

I'm not arguing against it being better, I'm arguing against the blanket "If they had written the base64 decoder in Java, it would not have this vulnerability" argument that was in the post that started this particular discussion.

Or another way to view it: if they had fully implemented it in Java, it would have been safe. All vulnerabilities were in human written C or assembly code (which could also be true for Vector API code).

Comment Re:"memory-safe" (Score 1) 36

This is what comes of people who don't use profilers or don't understand how their code works enough to realize where the bottle necks are.

I don't think that's true of the authors, though.

And optimizing it wasn't a bad idea. The pure java version was already optimizable, and using AVX is a good, supposedly easy way to speed it up. Decoding a token is only a fraction of a web request processing time, but it does matter for bigger payloads too (mime...)

Comment Re: "memory-safe" (Score 1) 36

True, it's in incubation, that's why it was just an experiment. You're also right about the vector API using intrinsics, but that can be said of any low level feature. So is all the JIT. It does move the problem indeed, but to a central place, so that is now what needs to be verified instead of every specialized use case like base64.

Comment Re:"memory-safe" (Score 1) 36

You're free to share your wisdom, but it sounds like you handwave it without going into much details. As an exercise, I reimplemented that base64 in pure Java, using the recent Vector API (and improving it a bit too to get fully on par, so it wouldn't work as is). It matches native speeds within a few %. But in its current state, without optional/incubating APIs, you can't get it as fast. It used to have no native stub (that's why older versions aren't impacted), but there is a serious speed difference. It's one of the cases for which those new APIs make a real difference to your usual JITted code.

Comment Re: "memory-safe" (Score 1) 36

Which isn't really true. There are a lot of examples of Java being *a bit slower than C implementation*, but same rank. We're not in 1995 applets era. As an exercise, I reimplemented that base64 in pure Java, using the recent Vector API (and improving it a bit too to get fully on par, so it wouldn't work as is). It matches native speeds within a few %.

Comment apache commons (Score 1) 115

"Commons"? Fortunately, not universal. Naming a library "commons" does not make it part of the language. All those Apache Commons libraries share one thing: they are mostly collections of anti-patterns. Stuff that can often be done better without dependencies, with real standard libraries (part of the platform) instead of collections of trees of mutually-incompatible libraries that look as written by a lazy first-year student. They feature null checks that make it obvious that the lazy programmer that use them consider null and empty as equivalent, which should in itself raise red lights. At best, they reinvent the wheel, quite often in a bad way. Those dependencies are something you won't find in my projects, and the first thing I remove from projects that I have to take over. Whoever depends on this deserved those things. I'd need to read TFA more extensively, but is there any bug report open for the concerned app servers?

Slashdot Top Deals

Whatever is not nailed down is mine. Whatever I can pry up is not nailed down. -- Collis P. Huntingdon, railroad tycoon

Working...