HNHacker News
TopNewBestAskShowJobs

kobebrookskC3

84 karma · joined April 15, 2021

submissionscomments
kobebrookskC3··on Understanding Memory Management, Part 5: Fighting with Rust
> Oberon is similar. The typesolver will determine if something is safe, without the need for explicitly borrowing anything.

so what does oberon do to prevent you from resizing a possibly reallocating array while holding a reference into it?

kobebrookskC3··on Understanding Memory Management, Part 5: Fighting with Rust
doesn't spark do something inspired by rust to get safe dynamic memory allocation? https://docs.adacore.com/spark2014-docs/html/ug/en/source/ac...

what does oberon do?

kobebrookskC3··on Understanding Memory Management, Part 5: Fighting with Rust
sure, rust is not the final answer to eliminating memory safety bugs from systems programming. but what are the alternatives, that aren't even more onerous and/or limited in scope (ats, frama-c, proofs)?
kobebrookskC3··on LibreLingo – FOSS Alternative to Duolingo
i bet 99% of people will wash out of the 30 day routine, me being one of them. there are better ways to start than drinking from the firehose of "simple anime"
kobebrookskC3··on Ask HN: Memory-safe low level languages?
in practice, i don't see rust programs with memory unsafety, but i picked the first zig project that came to mind, bun, and it is riddled with segfaults https://github.com/oven-sh/bun/issues?q=is%3Aissue%20state%3...
kobebrookskC3··on A year of Rust in ClickHouse
even in c, you can't assume memory is a flat array of bytes. pointers have provenance, and compilers exploit this: https://godbolt.org/z/ondGh4Ynn
kobebrookskC3··on How to Secure Existing C and C++ Software Without Memory Safety [pdf]
does making software scale? i see exploits for android/ios even though they spend millions if not billions on securing it. which unsound techniques make exploits unfeasible? i'm not even looking for a guarantee, just an absence in practice.
kobebrookskC3··on How to Secure Existing C and C++ Software Without Memory Safety [pdf]
what vulnerabilities does rust introduce over c/c++?
kobebrookskC3··on Crabtime: Zig’s Comptime in Rust
some correctness matters more than others. for a web browser, i would rather use a browser that is buggy/janky/crashy but doesn't give random websites arbitrary native code execution over a browser that is logically correct except for giving random websites rce. the languages that are more sound than rust are probably worse among some axis like ease of use, expressivity or performance. even if they weren't, they're probably not going to buy me much more than a slightly less buggy/janky/crashy browser, once you no longer have exploitable memory safety bugs.
kobebrookskC3··on Crabtime: Zig’s Comptime in Rust
how does zig express a trait like Send https://doc.rust-lang.org/std/marker/trait.Send.html which ensures that values can safely be moved to another thread, for example when spawning a thread? https://doc.rust-lang.org/std/thread/fn.spawn.html
kobebrookskC3··on Effective Rust (2024)
no, undefined behavior not just behavior that is not covered by the language definition. undefined behavior is term of art largely taken from C/C++, basically meaning that correct programs are assumed not to have these behaviors. for example, see https://en.cppreference.com/w/c/language/behavior. the definition of ub is not "just marketing". many major security vulnerabilities stem from having ub (out of bounds access, use after free). the point of rust is pretty much that you have to try hard to have ub, whereas in c/c++, it's basically impossible to not have ub.
kobebrookskC3··on Greg K-H: "Writing new code in Rust is a win for all of us"
you wanna verify all your c just for memory safety? i bet you if you actually tried to verify c for memory safety, you would come screaming back to rust.

and also seL4 is about 10k lines of code, designed around verification, sequential, and already a landmark achievement of verification. linux is like 3 orders of magnitude more code, not designed around verification, and concurrent.

kobebrookskC3··on Solving the ABA Problem in Rust with Tagged Pointers
modules are meant to be the boundary for a safe abstraction, but sometimes you get fun holes like https://github.com/rust-lang/rust/issues/128872 where you can implement Copy for a type in a different module in the same crate, even if the fields are private
kobebrookskC3··on Solving the ABA Problem in Rust with Tagged Pointers
seems pretty safe in practice https://security.googleblog.com/2024/09/eliminating-memory-s...
kobebrookskC3··on Solving the ABA Problem in Rust with Tagged Pointers
> If people really cared about that above all else they would use a memory-safe language, which Rust is not, such as Java or Python or Haskell or something.

people already use languages like java or python or js in most cases! it's only in rare cases it made sense to write stuff in c or c++. now with rust, that niche becomes even smaller.

> Governments aren't "bugging" anyone about memory safety

idk this report sounds like bugging from governments (plural) to me: https://www.cisa.gov/sites/default/files/2023-12/The-Case-fo...

no one who isn't being obtuse would say rust isn't memory safe. the linked report also deems rust a memory safe language.

kobebrookskC3··on Solving the ABA Problem in Rust with Tagged Pointers
all those advantages and disadvantages you list are basically insignificant compared to rust being memory safe by default and c/c++ not. governments aren't bugging projects about any of those, but are about memory safety.
kobebrookskC3··on Resigning as Asahi Linux project lead
why not? just tell them "if you don't like it, you can get a refund" (aka fuck off)
kobebrookskC3··on Ask not what the compiler can do for you
how is integer overflow unsafe? integer overflow in rust is not ub, unless you opt into the *_unchecked methods
kobebrookskC3··on I use C when I believe in memory safety
it's also a very limited version of C, without concurrency, dynamic memory allocation, or goto, and you can't even take the address of local variables!
kobebrookskC3··on I use C when I believe in memory safety
curiously, seL4 doesn't need to trust the compiler: the assembly is verified to satisfy the abstract specification
kobebrookskC3··on The year of C++ successor languages
if you see it in the logs, that seems like bots looking for low hanging fruit. what about focused attacks by sophisticated adversaries? here, a heap buffer overflow in a c++ library is a major part of enabling rce https://en.wikipedia.org/wiki/Xpdf
kobebrookskC3··on The year of C++ successor languages
is your software actively attacked like major browsers/operating systems?
kobebrookskC3··on Memory Safe Languages in Android 13
https://github.com/seL4/seL4 begs to differ :)
kobebrookskC3··on Memory Safe Languages in Android 13
maybe https://docs.rs/cap-std/latest/cap_std/fs/index.html would prevent that?
kobebrookskC3··on Rust Is Hard, Or: The Misery of Mainstream Programming
> Rust ... "Isn't Really Safe" because you can get into a point where memory is corrupted

i dare you to find memory corruption in safe rust that isn't already on an issue tracker.

> Saying that a language is either safe or unsafe implies that the "safe" language is actually safe while the "unsafe" language is completely deadly.

tell that to the people who got owned by https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-i... , most likely human rights activists targeted by less-than-savory regimes. memory corruption bugs are so frequent that it is possible for nso group to sell to pretty much any regime, and not forced to be classified as top secret information.

kobebrookskC3··on ‘Zero-click’ hacks are growing in popularity
what do you mean invalidated? the point of proofs is that they will be still be as true today as they will millenia into the future. pythagoras' theorem is just as true today as it was millenia ago.
kobebrookskC3··on C++ Frequently Questioned Answers (2009)
the world can't afford new code written in a blatantly memory-unsafe language
kobebrookskC3··on C++ Frequently Questioned Answers (2009)
> it doesn't solve any problem they have

you mean a problem blithely ignored until the software becomes important enough to attack, at which point, it's too late to rewrite the "very old" code? https://googleprojectzero.blogspot.com/2022/01/zooming-in-on...

> errors they do not make.

bullshit. a quick look at oss-fuzz on c++ projects, many of them in modern c++, will show that they are teeming with memory unsafety.

> there is no eliminating bad programmers, but plenty of reasons to avoid their product.

on an unrelated note, what product are you responsible for, so i can avoid it?

kobebrookskC3··on Why the C Language Will Never Stop You from Making Mistakes
supposing a compiler, was written in c, would frama-c be able to get similar guarantees that coq allows for compcert?

also, what happens when the loop invariants can't be automatically proved? is there some way to manually prove invariants hold?

kobebrookskC3··on Why the C Language Will Never Stop You from Making Mistakes
these are relatively small, relatively self-contained algorithms and data structures though, right? not a "big" piece of software.
← PreviousPage 2 of 4Next →